Debugger

VSCode has great debuggers.  Instead of using var_dump and echo statements throughout your application, using a debugger can save you an enormous amount of time, often making debugging 3-10 times faster!  This is especially true for debugging a large complex application.

Learn about setting up a debugger for PHP in Visual Studio Code.  A good starting point is https://code.visualstudio.com/docs/languages/php


As seen in the video, it uses spark for launching and externalConsole. However, in our case, we won't be using that. Our launch.json will look like this:

```json { "version": "0.2.0", "configurations": [ { "name": "Launch Built-in web server", "type": "php", "request": "launch", "runtimeArgs": [ "-dxdebug.mode=debug", "-dxdebug.start_with_request=yes", "-S", "localhost:8080", "-t", "${workspaceRoot}" ], "env": { ...