Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 1.51 KB

debugging.md

File metadata and controls

23 lines (17 loc) · 1.51 KB

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 here.

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

{% hint style="warning" %} Do you get an error while starting the debugger? Please refer to this thread. {% endhint %}

Remote development

If you are using the Remote SSH extension 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 here.