diff --git a/docs/user-guide/error-handling.md b/docs/user-guide/error-handling.md deleted file mode 100644 index a7cd9b9..0000000 --- a/docs/user-guide/error-handling.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Error Handling ---- - -Break on uncaught exceptions and errors, and inspect the state of your application at the moment things go wrong. - -:::note -This page is a work in progress — full documentation is coming soon. -::: diff --git a/docs/user-guide/logging.md b/docs/user-guide/logging.md index 621d46d..b35db60 100644 --- a/docs/user-guide/logging.md +++ b/docs/user-guide/logging.md @@ -4,11 +4,14 @@ title: Logging Two different things get called logging here, and they solve different problems. -One is your own output — the `echo` and `var_dump()` you scatter about — arriving -in your editor instead of the response body. The other is the debugger's own log, -which is what you reach for when the debugger itself is not behaving. +One is what your request produces as it runs — the `echo` and `var_dump()` you +scatter about, and the warnings PHP raises along the way — arriving in your editor +instead of the response body. The other is the debugger's own log, which is what +you reach for when the debugger itself is not behaving. -## Your script's output in the editor +## What your request produces + +### Your script's output Your editor can ask for a copy of everything the script writes to standard output. `echo`, `print_r()`, `var_dump()`, whatever a framework writes — all of it appears @@ -46,6 +49,23 @@ in the PHP error log for it. ::: +### Errors, warnings and notices + +Separately from that output, your editor can ask to be told about every diagnostic +PHP raises — errors, warnings, notices and deprecations — as they occur. Each one +arrives with its message, its file and its line, and the script keeps running. + +This is the middle ground between the two extremes. Ignoring a warning means +finding it later in a log, if at all; breaking on one, with an +[exception breakpoint](./breakpoints.md#exception-breakpoints) on `Warning`, stops +you dead every time it fires. A notification just tells you, in order, alongside +everything else the request did. + +This is a separate editor setting from output capture, negotiated the same way and +likewise off unless your editor asks for it. It is worth turning on and leaving +on: a deprecation you would never have gone looking for is exactly the kind of +thing that turns up in that panel. + ## The debugger's own log The debug log is for the times the debugger is the problem: the session never diff --git a/sidebars.js b/sidebars.js index 6b23c9e..84ba1f7 100644 --- a/sidebars.js +++ b/sidebars.js @@ -39,7 +39,6 @@ const sidebars = { 'user-guide/inspect-variables', 'user-guide/watches-and-edits', 'user-guide/logging', - 'user-guide/error-handling', ], }, {