Skip to content

Add context information to Debug::dump() - #949

Merged
giuscris merged 2 commits into
2.xfrom
feature/debug-dump-context
Sep 7, 2026
Merged

giuscris merged 2 commits into
2.xfrom
feature/debug-dump-context

Conversation

@giuscris

@giuscris giuscris commented Sep 6, 2026

Copy link
Copy Markdown
Member

This pull request enhances the debug output in the Debug class to provide better context and improve readability. The changes ensure that debug dumps are only shown when HTML output is appropriate, add context about where the dump was called, and improve the visual separation of dumped items.

Debug output improvements:

  • The dump method now only outputs debug information if the client accepts HTML, preventing unwanted output in non-HTML contexts.
  • Each debug dump now includes contextual information (file name and line number) about where the dump was called, using the new getContext() method and a backtrace limit. [1] [2] [3]
  • Dumped items are visually separated with a dashed border and spacing for better readability, thanks to new CSS rules.
  • Each dumped value is wrapped in its own container, making the output clearer and easier to scan.

@giuscris giuscris added this to the 2.4.0 milestone Sep 6, 2026
@giuscris giuscris self-assigned this Sep 6, 2026
@giuscris
giuscris merged commit f54d4dd into 2.x Sep 7, 2026
1 check passed
@giuscris
giuscris deleted the feature/debug-dump-context branch September 7, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant