Search code examples
phpvisual-studio-codedebuggingxdebug

In xdebug Step Over, Step Into and Step Out buttons are disabled


We are using Visual Studio Code and trying to debug. When we try to debug, the "Step Over", "Step Into" and "Step Out" buttons are seems disabled as in this image:

enter image description here

We installed WAMP 3.3.2. Then enabled Xdebug. We followed Xdebug installation wizard and till this everything works as expected.

Then we opened Visual Studio Code and installed PHP debug (V1.34.0). Then included runtimeExecutable in launch.json.

Then we clicked "Run and Debug -> Start Debugging". We could see 'Running' in Call stack. But the "Step Over", "Step Into" and "Step Out" buttons are disabled and not able to display variables and see their values in each step.

php.ini setting is as below

[xdebug]
zend_extension="c:/wamp332/bin/php/php8.2.13/zend_ext/php_xdebug-3.2.2-8.2-vs16-x86_64.dll"
;xdebug.mode allowed are : off develop coverage debug gcstats profile trace
xdebug.mode =develop
xdebug.output_dir ="c:/wamp332/tmp"
xdebug.show_local_vars=0
xdebug.log="c:/wamp332/logs/xdebug.log"
;xdebug.log_level : 0 Criticals, 1 Connection, 3 Warnings, 5 Communication, 7 Information, 10 Debug Breakpoint
xdebug.log_level=7
xdebug.profiler_output_name=trace.%H.%t.%p.cgrind
xdebug.use_compression=false

But I no errors are logged in xdebug.log. Please suggest


Solution

  • As per @LazyOne, for debugging you need to include debug in the xdebug.mode setting, such as in:

    xdebug.mode=develop,debug