Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dump debug panel #12506

Merged

Conversation

brandonkelly
Copy link
Member

Description

Adds a new {% dump %} tag, which will dump a variable (or the current context if no variable is provided), and capture the dump output, making it available in a new “Dumps” debug toolbar panel.

The new “Dumps” debug toolbar panel, showing two dumped variables.

@brandonkelly brandonkelly requested a review from a team as a code owner January 6, 2023 20:18
@linear
Copy link

linear bot commented Jan 6, 2023

[ci skip]
@brandonkelly brandonkelly merged commit 14ceb5e into 4.4 Jan 6, 2023
@brandonkelly brandonkelly deleted the feature/dev-1068-dump-variables-to-the-debug-toolbar branch January 6, 2023 20:21
@lewisjenkins
Copy link

Is it also possible to dump to the toolbar from a plugin or module?

@brandonkelly
Copy link
Member Author

brandonkelly commented Mar 14, 2023

@lewisjenkins Yep! Like so:

use craft\debug\DumpPanel;

DumpPanel::dump($var, $filename, $lineNo);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants