Asked  7 Months ago    Answers:  5   Viewed   42 times

I have installed Xampp on Windows (Well actually both xampp and wamp but both have the same problem), and enabled xdebug. I have installed the latest eclipse for php with pdt included. The breakpoints are working correctly however if I press f6 or f5 the current line does not get updated, the variables change as if I had stepped to the following line but the highlighted line remains the same. Any ideas?

I attach some screenshots to make it easier to understand:

Breakpoint works:

enter image description here

I press f6, lineno and $a changes in the 'Debug' and 'Variables' window:

enter image description here

I press f6 again:

enter image description here

I tried updating to the latest xdebug but the same thing happens.



This is problem in Eclipse SR1. You should switch back to R (SR0) release, next you can install PDT 3.3.1 from marketplace.

See also bug report on bugzilla


Problem is fixed in nightly builds:

Edit 2:

We released new stable (3.3.2) version with fix for this problem. You can find it on marketplace or in this update site:

Wednesday, March 31, 2021
answered 7 Months ago

May be you should try to upgrade xdebug version?

Also how did you installed Juno? Just clean install or update?

Try clean install in another folder and copy you workspace settings. Or try without them.

Wednesday, March 31, 2021
answered 7 Months ago

Try this. Right-click your top level folder in PHP Explorer. Select the "Configure" menu item then "Add PHP Support".

Saturday, May 29, 2021
answered 5 Months ago

What causes that message in the first place:

You have xdebug.start_with_request = yes (which is the same as xdebug.remote_autostart = yes for Xdebug v2). This option tells Xdebug to try to debug every single request/script regardless of the "debug me" flag.

If Xdebug fails to connect to the debug client (values from xdebug.client_host & xdebug.client_port .. or autodetected host if xdebug.discover_client_host is enabled) then it notifies you about that.

How to prevent it from appearing on my screen/in the output:

Xdebug uses standard PHP routines to write such warnings (e.g. standard PHP error_log() function). Normally such a message will be written to the standard PHP's error log. Looks like you do not have it configured at all in your php.ini (empty value) therefore PHP sends it to your standard output instead (so you still can have a chance to see it, as it might be important).

The solution is to point PHP's error_log ini setting to some valid location so you can read it when needed (path depends on your OS & distro, e.g. error_log = /var/log/php_error.log would be very common). If you do not need such log at all (have other logging system in place) -- use /dev/null or something similar instead.

You can also try xdebug.log_level = 0 but this should prevent Xdebug from logging anything, even if you specify xdebug.log.

Thursday, August 12, 2021
answered 2 Months ago

You need to add the xdebug configuration to your php.ini so that if phpunit invokes the php-interpreter another time (b/c of @runTestsInSeparateProcesses) to run the test in a separate process is loaded and has xdebug activate automatically (remote debug settings etc.) w/o any further parameters passed to the executable.

If you have done this already (which might not be the case from your question), ensure that your IDE is accepting more than a single xdebug connection (xdebug connection limit or similar). This is necessary as a new PHP process will start a new xdebug remote session which needs an additional connection. If that connection is not fulfilled, xdebug will wait so with a connection limit of one (1) for example, you will see that PHP hangs.

The drawback with this approach is that xdebug will be loaded always which will add ca. 10% performance onto PHP executed within the CLI.

As far as this is on a development box, you can create yourself some script you can run to switch xdebug default configuration on and off for the installed PHP binary.

Composer is not affected by this as it will re-launch itself with xdebug disabled, but most other PHP cli tools don't do this (and perhaps don't need it as there is so much performance available and the drawback can be neglected. it's mostly important for PHP scripts that do a lot of object creation and such).

So, setup your php.ini and enable xdebug. A good IDE shows the settings it automatically adds (PHP cli -d options), just add these to your php.ini and you should be fine for that testing scenario.

When you get it to work, think about how to disable settings on the fly (sed is handy for that, especially with -i [edit In place] on GNU systems, Stackoverflow should keep you happy with the basics here, for Windows I can't say what is working well, in case you wonder).

Additional note: I can't specifically say for Netbeans as I don't use it, but with Phpstorm this is quite the same (I assume in good faith) as it adds xdebug to the PHP configuration when invoked for tests (debug, coverage), and spawned sub-process which lead to other PHP scripts can't be debugged unless I put that added xdebug configuration into the php.ini.

Saturday, August 28, 2021
answered 2 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :