You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add SQL query to Selector Queries section of Debug Mode panel. Tweak to hopefully fix Console panel not opening fully sometimes. Disable zoom on icons in docs.

13
+

14
14
15
15
<br />
16
16
<aclass="github-button"href="https://github.com/adrianbj/TracyDebugger"data-icon="octicon-star"data-size="large"data-show-count="true"aria-label="Star adrianbj/TracyDebugger on GitHub">Star</a>
Copy file name to clipboardExpand all lines: docs/debug-bar.md
+34-34Lines changed: 34 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
# Debug Bar
2
2
The debug bar shows non-fatal errors, dumps, and provides access to all the custom panels/tools for ProcessWire development. You can set the default panels for both frontend and backend versions of the bar and also add / remove them on-the-fly via the [Panel Selector](#panel-selector).
3
3
4
-

4
+

This panel lets you output anything you want. Primarily I see this being used for creating links to things like Google PageSpeed, but use your imagination.
Provides access to most of the information that is available in the back-end "Debug Mode Tools" section of your PW admin. This panel makes it available on the front-end and even when Debug Mode is off. Note that with Debug Mode Off, you won't have access to the "Database Queries", "Timers", and "Autload" sections. This is a ProcessWire core restriction.
56
56
57
57
Other information from the back-end "Debug Mode Tools" (POST, GET, REQUEST, COOKIE, SESSION) have been moved to the [Request Info Panel](#request-info).
@@ -62,7 +62,7 @@ The icon color on the debug bar is red when debug mode is on and green when it i
Overview of the filesystem access permissions for all the key folders and files in your PW install. It also provides status and notes about these. These should not be taken as definitive (especially if you are on a Windows system), but rather as a guide and reminder to check these. The debug bar icon for this panel is colored to match the most serious status level - OK, Warning, or Failure.
68
68
@@ -78,7 +78,7 @@ Some basic details about your MySQL server and client setup.
78
78
79
79
***
80
80
81
-
## Dumps
81
+
## Dumps
82
82
This panel is only displayed when you have called the barDump() method and contains the contents of that dump.
83
83
84
84
Note the second optional parameter used to name the outputs in the Dumps panel.
If this panel is enabled, any calls to bd() will be sent to this panel instead of the main dumps panel. This is useful in several situations where you want to compare dumps from various page requests. Dumps will be preserved until the session is closed, or until you click the "Clear Dumps" button. It can also be useful in some situations where dumps are not being captured with the regular dumps panel which can sometimes happen with modules, complex redirects, or other scenarios that are hard to pin down.
99
99
100
100
***
101
101
102
-
## Errors
102
+
## Errors
103
103
The errors panel is only displayed when there are non-fatal errors and you are not in Strict Mode. All PHP notices and warnings will be displayed in this panel.
* Supports editing all files in your PW install (you can define the root as /, /site, or /site/templates
141
141
* Can be used as the handler for opening editor links from the debug bar (errors, log files, Captain Hook, ToDo, Template editor, etc), rather than your code editor
@@ -163,29 +163,29 @@ For example, setting the hook to `Pages::save` and then deleting a page can resu
163
163
164
164
***
165
165
166
-
## Git Info
166
+
## Git Info
167
167
168
168
Displays the Git branch, latest commit message, etc for your site (assuming you have it under Git version control).
Intercepts all outgoing emails sent using `wireMail()` and displays them in the panel. Ideal for form submission testing. This panel is activated when enabled, so it's best to enable it from the Panel Selector using the sticky option when needed.
## Methods Info
181
+
## Methods Info
182
182
Lists available logging methods you can call in your PHP code.<br />Links to Tracy Debugger docs (this site) and [Tracy Nette docs](https://tracy.nette.org/)
This panel makes use of the ProcessWire core "disabled" flag for disabling autoload modules for testing / debugging purposes. It can potentially result in a fatal error on your site (this is a ProcessWire core issue, rather than specific to this panel). Because of this, it is only available when ProcessWire's advanced and debug modes are enabled.
190
190
191
191
If you do end up with a fatal error after disabling a module, this panel provides a script for automatically restoring the modules database table. Whenever you disable any modules, a backup of the "modules" database table is automatically saved.
Indicates which mode Tracy is in - DEVELOPMENT or PRODUCTION - this is determined at runtime so if you have configured it to "Detect" mode, you can easily see which mode it has automatically switched to. This is useful if you have the "Superuser Force Development Mode" option enabled because you will see the debug bar even in Production mode.
207
207
208
208

@@ -212,7 +212,7 @@ Indicates which mode Tracy is in - DEVELOPMENT or PRODUCTION - this is determine
This panel records the ID of all pages added whenever it is enabled (so this is one you'll want off by default and just enabled via "Sticky" when you need it).
217
217
218
218
This is perfect for all sorts of testing, whether you need to create a LOT of pages for performance testing or you are testing a form which is automatically creating pages. Once you are done with the testing session, simply click the "Trash Recorded Pages" button and they will all be moved to the Trash.
@@ -223,7 +223,7 @@ If you decide you want to keep the pages, you can click "Clear Recorded Pages Li
Performance Panel is a third party extension for Tracy developed by Martin Jirásek. It adds support for inserting named breakpoints in your code and reports execution time and various memory usages stats between the various breakpoints. This is where calls to addBreakpoint() are rendered.
248
248
249
249
```
@@ -264,7 +264,7 @@ bp('D');
264
264
265
265
***
266
266
267
-
## PHP Info
267
+
## PHP Info
268
268
Provides all the output from PHP's `phpinfo()`. Probable best to leave disabled unless you need to check something.
269
269
270
270
CTRL/CMD+F works well to find relevant entries within this panel (and all panels actually), although this seems to be browser specific. It works in Chrome and Safari, but not Firefox.
@@ -273,21 +273,21 @@ CTRL/CMD+F works well to find relevant entries within this panel (and all panels
273
273
274
274
***
275
275
276
-
## Processwire Info
276
+
## Processwire Info
277
277
Provides a wide variety of links, information and search features for all things ProcessWire.
278
278
279
279

Displays the most recent entries across all ProcessWire log files with links to view the log in the PW logs viewer, as well as direct links to view each entry in your code editor. By default it shows the last 10, but this can be changed in the config settings. A red icon indicates the last page load contained an errors or exceptions log entry. An orange icon is for all other log types.
## ProcessWire Version
290
+
## ProcessWire Version
291
291
Lets you instantly switch your PW version. This is probably most useful for module developers, but can also be helpful for other users to help debug PW core or module problems. It's probably obvious, but the switcher is not recommended for live sites, so don't blame me if a version change breaks your site (especially between the 2.x and 3.x branch)!
292
292
293
293
The available versions come from Ryan's ProcessWire Upgrades module - so any version that you installed via it will be available.
@@ -300,7 +300,7 @@ The icon is green when you are using the latest version that is available on you
300
300
301
301
***
302
302
303
-
## Request Info
303
+
## Request Info
304
304
305
305
Provides very detailed infomation and links related to the current page. It contains several expandable sections listed below.
306
306
@@ -323,7 +323,7 @@ Here is another example showing three different image fields; images (with Maxim
This is similar to the [Console Panel](#console), but instead lets you run snippets stored on the server's filesystem which allows for easier version control, and also for editing snippets in your code editor. It has access to all the same ProcessWire system variables that the Console panel has, so please see it's documentation for details.
328
328
329
329
Snippets can be stored in either of these. Visit the config settings to set which you prefer. You can also make use of subfolders to categorize your snippets.
@@ -334,14 +334,14 @@ Snippets can be stored in either of these. Visit the config settings to set whic
334
334
335
335
***
336
336
337
-
## System Info
337
+
## System Info
338
338
Provides a table of basic stats about the current page and your system.
The template path panel allows you to temporarily choose an alternate template file for rendering the current page. It provides a list of files in the site/templates folder that match the name of the default template file, but with a "-suffix" extension. You can have several different versions and quickly test each one. You can make the change last for the browser session (sticky), or just for one reload (once). You can reset to the default template file for the current page, or all changes you may have made to other pages/template files on the site.
346
346
347
347
Not only is this useful for debugging (especially on a live production server), but it could also be used for sharing different versions of a page among trusted users.
@@ -377,7 +377,7 @@ If you are on a page that is using an alternate template due to user permissions
Displays the names, types, and values of all variables defined in the template file (and any other included files) for the current page. It also shows any defined constants and functions (linked to open in your code editor), as well as a list of included files (also linked to open in your code editor).
@@ -386,7 +386,7 @@ Displays the names, types, and values of all variables defined in the template f
386
386
387
387
***
388
388
389
-
## Todo
389
+
## Todo
390
390
The ToDo Panel report the following comment types: 'todo', 'fixme', 'pending', 'xxx', 'hack', 'bug'. See the config settings for determining which folders and files will be scanned.
391
391
392
392
If you have your editor configured, the comment text link opens the file to the line of the comment.
@@ -401,19 +401,19 @@ The icon reports the number of items in the template file for the current file /
Displays the most recent entries from the Tracy log files. These log files can be written to automatically when Tracy is in Production mode, or manually using `TD::log()` or `l()` calls. Includes direct links to view each entry in your code editor. By default it shows the last 10, but this can be changed in the config settings. A red icon indicates the last page load contained an error, exception, or critical log entry. An orange icon is for all other log types.
Not really a panel, but this button on the debug bar lets you toggle Tracy on / off without needing to visit the module config settings. If you don't want another button always taking up room, you can also use the "Disable Tracy" button on the Panel Selector. Another alternative is the Hide/Show toggle icon at the far right of the debug bar, although this one doesn't actually turn Tracy off, but it gets the debug out of the way.
Allows you to instantly switch to any user in the system without knowing their password. After switching, you will still have full access to the Tracy debug bar, which can be very useful for debugging issues with other users and even guest (not logged in) visitors.
418
418
419
419
* You need to be a superuser to have access to the panel until a session is started, so even when Development mode is enabled, other users still won't be able to use it.
@@ -431,14 +431,14 @@ As usual, icon colors are meaningful, telling you what type of user is currently
431
431
432
432
***
433
433
434
-
## Users
434
+
## Users
435
435
Lists all the users/roles with access to the Tracy Debugger bar. A green debug bar icon indicates that only superusers can access the debug bar. An orange icon indicates that others have the tracy-debugger permission and may be able to see the debug bar. Another good reason to have the "Superuser Force Development Mode" option enabled because you will see this warning even in Production mode.
0 commit comments