Skip to content

Add closure signature and backtrace parameters to the debug functionality - #710

Merged
giuscris merged 3 commits into
2.xfrom
feature/debug-improvements
Jun 28, 2025
Merged

Add closure signature and backtrace parameters to the debug functionality#710
giuscris merged 3 commits into
2.xfrom
feature/debug-improvements

Conversation

@giuscris

Copy link
Copy Markdown
Member

No description provided.

@giuscris giuscris added this to the 2.0.0 milestone Jun 28, 2025
@giuscris
giuscris requested a review from Copilot June 28, 2025 20:17
@giuscris giuscris self-assigned this Jun 28, 2025
@giuscris giuscris added the enhancement New feature or request label Jun 28, 2025

This comment was marked as outdated.

@giuscris
giuscris requested a review from Copilot June 28, 2025 20:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the debug functionality by adding a display of closure signatures and backtrace parameters while introducing additional styling.

  • Renames trace variables to frame for improved clarity and adjusts the filtering logic in error views.
  • Implements a detailed closure signature and metadata display in the Debug functionality.
  • Adds new CSS styles for better visualization of backtrace parameters.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
panel/views/errors/error.php Renames $trace to $frame and updates the filtering condition in the backtrace loop.
formwork/views/errors/partials/header.php Adds CSS rules for styling backtrace parameters.
formwork/views/errors/partials/debug.php Applies similar backtrace rendering improvements as in error.php.
formwork/src/Debug/Debug.php Adds closure signature generation with backtrace metadata output.
formwork/src/Debug/CodeDumper.php Introduces dumpBacktraceFrame and new CSS for trace call and parameters.
Comments suppressed due to low confidence (1)

panel/views/errors/error.php:36

  • The updated filtering condition now uses '||' instead of the previous '&&', which means a frame will be displayed if either the file or the line differs from the throwable. Please confirm that this change in logic is intentional.
                        <?php if (isset($frame['file'], $frame['line']) && ($frame['file'] !== $throwable->getFile() || $frame['line'] !== $throwable->getLine())): ?>

@giuscris
giuscris merged commit 086a032 into 2.x Jun 28, 2025
1 check passed
@giuscris
giuscris deleted the feature/debug-improvements branch June 28, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants