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

Return debugger contents on AJAX task calls #1605

Closed
hamiltont opened this issue Jan 30, 2019 · 1 comment
Closed

Return debugger contents on AJAX task calls #1605

hamiltont opened this issue Jan 30, 2019 · 1 comment

Comments

@hamiltont
Copy link

When the admin page gets a task request, it processes and returns data as JSON. Right before calling sending the json response and calling exit, would it be possible to also grab the contents of grav['debugger'] and extend the admin javascript to append those contents onto the existing debug log?

Basically, anything done inside an admin task cannot (currently) use the debugger - it has to either add debug material into the content you want to return, or dump it to the log. This can bite you in unexpected ways e.g. other plugins that extend grav and suddenly cannot reliably use the debugger inside their logic

If this sounds reasonable, it would likely also be wise to have the debugger include a line about the task being sent (e.g. "Sending task 'processmarkdown'"). There are a few other ways admin could be tweaked to know if the debugger was online and integrate nicely, but this is a solid first step

For some context, see getgrav/grav-plugin-shortcode-core#60

@mahagr mahagr self-assigned this Feb 6, 2019
@mahagr mahagr added the fixed label Jul 9, 2019
@mahagr
Copy link
Member

mahagr commented Jul 9, 2019

Grav 1.7 / admin 1.10 supports clockwork debugging tool, which logs and displays all the requests.

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

No branches or pull requests

3 participants