Tracy bars (and AJAX bluescreens) are saved to the remote server (as rendered HTML) and displayed at Tracy - RemoteBar app (simple web page) or Chrome Dev panel.
The most advantage is, with this you can use Tracy bars also on API, cli, etc. Also, PHP SESSION is not started for this setup.
IMPORTANT! With this, bars are not rendered on the page.
- to enable remote rendering just set
Debugger::$remoteServerUrl
with correct server URL (for examplehttp://127.0.0.1:7979
)- or use setting via DI:
tracy:
remoteServerUrl: 'http://127.0.0.1:7979'
- then open URL
http://127.0.0.1:7979
and you will all your Tracy Bars (and AJAX errors) rendered
IMPORTANT! replace
127.0.0.1
with your local IP address or server name
- to run test remote server, just use
run-tracy-remote-bar
batch (this will use integrated PHP server on the port7979
and all available IP addresses)
HINT: you can also set nginx/Apache virtual host, pointing to
remote-tracy/src/Remote/public
with PHP (min version 7.4) support.
- in long running cli scripts, you can manually dispatch bars calling
Debugger::remoteDispatchBars()
- open
Menu - More tools - Extensions
- enable
Developer mode
(on the top right of the page) - set correct URL in
remote-tracy/chrome-dev-panel/html/panel.html
-data-tracy-remote-bar-url
- click
Load unpacked
and select the path tochrome-dev-panel
directory - now you can see panel Tracy - Remote bar in Chrome developer tools
To see all the features, there is a simple sample Nette application. Run it with run-sample-app
at port 8080
. You can see Tracy bar for all types (web page, redirects, AJAX, API, cli...).
Before running, just update correct server URL in sample-app/config/local.neon
.