Stop changing how the debugger works each time. PLEASE

I remember and miss the times when local helps me a lot to setup a LAMP env in a fast and reliable way, it was using virtual box in behind and each environment was complete isolated. I’m that old user.

At this point each time a new update comes I’m afraid to apply it because I lost the ability to work fast and that means debugging.

Guys would it be possible to keep the stuff with a decent backward compatibility when is possible not in each version. I’m in the group of users that use local to deliver result to my clients.

If anyone have the same issue over the time and solve it, please help me a bit even if you find a different software.

At the time I wrote this; my solution was to add xdebug.mode="debug" into the php.ini.hbs

Hi @gfirem, Good news confirming that LocalWP 9.1.0 is defaulting to xdebug.mode=debug,develop. This is one less step to be done for each local website.

When it comes to step-debugging, triggered through a web browser front end session, there is still a manual configuration to be done in the php.ini.hbs file.

The default xdebug command is just xdebug.start_with_request=yes.

Changing this to be a unique token for each local website, passed in from the web browser session does allow multiple local websites to be up and running and the respective step-debugging session to all play nice with each other. In the below example, you would:

  1. For each local website, in its specific php.ini.hbs file, replace blanky-001.local with the unique local domain you are using locally. This becomes a unique token/identifier that is intuitive to know which debug session and website is the focus.
  2. In the web browser extension (like Xdebug Chrome Extension), configure the token to be the same value you replaced blanky-001.local with.
  3. In your favourite coding IDE (like IntelliJ IDEA) configure the token to be the same value you replaced blanky-001.local with.
xdebug.start_with_request=trigger
xdebug.trigger_value=blanky-001.local

This last part, the 2 lines above, are the only tweaks required to get Xdebug set-debugging configured and running for multiple local websites to all play nice, while inspecting the code execution from a frontend web browser page refresh. This has been the only tweak I do to ensure many local websites can be created, played with, left to sleep for a long time and then come back to them later and just pick up where I left off.

1 Like

Consider using Docker for isolated environments with backward compatibility and faster setup for your projects.

Thank you for sharing your workflow here @johnlang86!