Skip to content

Logs and debugging

The Logs section of the site view has two tabs:

  • Server — the dev server's own output: everything the Playground server prints while starting and running.
  • debug.log — WordPress's PHP log for this site, streamed live while the dev server runs.

Output from npm install and npm run commands appears in the Terminal, not here.

The debug.log tab showing PHP notices

The debug.log tab

Anything WordPress or your code writes to the PHP error log — error_log() calls, notices, warnings, deprecations, _doing_it_wrong(), fatals — appears here while the dev server runs. This works because every site is booted with WordPress's debug constants already set. They are not configurable:

ConstantValueEffect
WP_DEBUGtrueNotices, warnings, and deprecations are reported.
WP_DEBUG_LOGtrueThey are written to wp-content/debug.log, which this panel tails.
WP_DEBUG_DISPLAYtrueErrors are also printed in the browser.
SCRIPT_DEBUGtrueCore serves unminified JS and CSS.
WP_DISABLE_FATAL_ERROR_HANDLERtrueA fatal shows the actual error instead of WordPress's "critical error" recovery screen.
AUTOMATIC_UPDATER_DISABLEDtrueCore's automatic updater does not run (and does not fill the log with its own messages).

Note that WP_DEBUG_DISPLAY has a known cost: a notice fired during a REST or AJAX request is printed into the response and can corrupt the JSON it expects. That trade is made deliberately — seeing the error beats a silent blank page for a newcomer.

While you are reading another tab, the debug.log tab shows an unread count, for example debug.log (3), so a notice landing while you watch the server output does not go unseen. Selecting the tab resets the count. The panel keeps the most recent 512 KB of the log.

Under the pane:

  • The full path to the log file (inside the site's build/wp-content/ directory) is shown and can be selected and copied — useful for tailing it in a real terminal or attaching it to a ticket.
  • Show in folder reveals the file in your file manager.
  • Copy puts the panel's contents on the clipboard, ready to paste into a Trac ticket or a pull request comment.
  • Clear empties both the panel and the file on disk. If the file cannot be cleared, the panel says so — otherwise the same lines would replay the next time the server starts.

The app's own log

The application keeps a separate log of its own activity — server starts, installs, errors. Do not confuse it with the site's debug.log. Open it from the menu: Help → Open App Log, or Help → Show Logs Folder to reveal the directory. This is the file to attach when reporting a problem with the app itself.