-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
WDT following AJAX requests #9692
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Misc typo fixes and improvements from PR.
- Loading branch information
commit b022371ba3b64fbb9776c110d92b5bfcdb131774
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
.. index:: | ||
single: Profiling: WDT Auto-update after AJAX Request | ||
|
||
How to make the Web Debug Toolbar Auto-upate after AJAX Requests | ||
How to make the Web Debug Toolbar Auto-update after AJAX Requests | ||
================================================================ | ||
|
||
For single page applications it is often inconvenient to find the profiler | ||
information for the most recent request. It would be much more convient if it | ||
the toolbar would show the information from the most recent AJAX request | ||
instead of your initial page load. | ||
For single page applications it would be more convenient if the toolbar | ||
showed the information for the most recent AJAX request instead of the | ||
initial page load. | ||
|
||
By setting the `Symfony-Debug-Toolbar-Replace` to a value of `1` in the | ||
By setting the `Symfony-Debug-Toolbar-Replace` header to a value of `1` in the | ||
AJAX request, the toolbar will be automatically reloaded for the request. The | ||
header can be set on the response object:: | ||
|
||
$response->headers->set('Symfony-Debug-Toolbar-Replace', 1); | ||
|
||
Only setting the header durring development | ||
Only setting the header during development | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For titles we use a special "title case" where the first letter of most, but not all, words is uppercased. So, this title should be:
|
||
------------------------------------------- | ||
|
||
Ideally this header should only be set durring development and not for | ||
Ideally this header should only be set during development and not for | ||
production. This can be accomplished by setting the header in a | ||
:ref:`kernel.response <component-http-kernel-kernel-response>` event listener:: | ||
|
||
|
@@ -33,8 +32,9 @@ production. This can be accomplished by setting the header in a | |
|
||
Read more Symfony events :ref:`/reference/events`. | ||
|
||
If you are using Symfony Flex, you should define your event listener service in the ``config/services_dev.yml`` file so that it only exists in the ``dev`` environment. | ||
If you are using Symfony Flex, you should define your event listener service in the | ||
``config/services_dev.yml`` file so that it only exists in the ``dev`` environment. | ||
|
||
.. seealso:: | ||
|
||
Read more on creating dev only services :ref:`/configuration/configuration_organization`. | ||
Read more on creating dev only services :ref:`/configuration/configuration_organization`. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax used in Symfony Docs is similar to Markdown, but different in some cases. One of those cases is the use of double backticks for code. This:
should be written like this:
Same for the
1
code used in the same phrase.