Debugging

If you are using VSCode you are ready to use preconfigured debug settings for PHP files. Just navigate to the ant icon left in your VSCode sidebar and click the play button. Read more about herearrow-up-right.

Generally, the following things gets done when it comes to debugging:

  1. Start your environment with yarn docker:start

  2. Start the debugger with the play icon

  3. Wait a moment until the debugger is ready. This can take a while for the first time because XDebug will be installed in the WordPress container

  4. Create a breakpoint in a PHP file

  5. Do something so the code gets executed

  6. The browser freezes and VSCode shows you that a breakpoint is reached

  7. Do something

  8. Stop the debugger

  9. XDebug gets deactivated in the WordPress container automatically

circle-exclamation

Remote development

If you are using the Remote SSH extensionarrow-up-right already you do not need to take further configurations. Just connect with your server via SSH and start the debugger. If you notice that the debugger "freezes" or "hangs" please make sure the debug port (in our case 9000) can be opened. Check your firewall, read more herearrow-up-right.

Last updated

Was this helpful?