I spend some hours to set up my IDE to debug PHP with eclipse and xdebug.. Everything is ok except the breakpoint I set on eclipse. If I double-click on a line to add a breakpoint, the debugger want not to stop.. If a add the line xdebug_break() the debugger stops well at the line...
It's maybe a problem with the configuration. Could anyone help me ?
PHP.ini
[xdebug] xdebug.remote_enable=1 xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_handler="dbgp" xdebug.remote_mode=req xdebug.profiler_enable = 1 xdebug.profiler_output_dir = "c:/temp" xdebug.collect_params = 4 xdebug.collect_return = on xdebug.collect_vars = on xdebug.show_local_vars = 1
Xdebug cannot connect to PhpStorm This means that Xdebug tries to connect to the host and can't make the connection. To fix the issue, set xdebug. remote_connect_back=0 ( xdebug. discover_client_host=false for Xdebug 3) and make sure that xdebug.
As of Xdebug 3, it is possible to disable the Xdebug completely by setting the option xdebug. mode to off , or by setting the environment variable XDEBUG_MODE=off . It is very easy to disable Xdebug just for composer, by aliasing composer . You can add the alias to your $HOME/.
The breakpoint will stop your program just before it executes any of the code on that line. Set a breakpoint at line linenum in source file filename .
If xdebug do not stop in any part of your code, add xdebug_break()
to this part of the code.
There seem to be several issues that could be the root of this problem. In my case it was the fact that I thought I needed to set some path mapping.
The settings found underrightclick-project->properties->PHP Debug
and thenserver->edit->path mapping
were wrong.
I had manually added something I though was correct, but Eclipse can do this all by its self it seems. Removing the mapping made it work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With