Skip to content
Advertisement

Xdebug + VSCode + PHP + WampServer : breakpoint not hit on start of debug session

A while back I succeeded at resolving this problem:

How to properly setup VSCode and Wampserver to be able to debug and pause on breakpoint line, using VSCode / PHP XDebug / PHP Debug Extension?

Now I have PHP 8 with the latest VSCode and Xdebug 3, but my breakpoint is not hit in my API, which runs with a custom host name renamed from localhost (virtual host) in back of a Node.js ReactJS app (on riskaim:3000, where as the PHP API server is running on riskaim:9003)

I can’t get the VSCode debugger to stop on the line on which I have set a breakpoint.

How do I resolve this?

Here are my settings:

Bottom of php.ini c:/wamp64/bin/apache/php/apache2.4.46/bin/php.ini

JavaScript

settings.json

JavaScript

launch.json

JavaScript

Middle of httpd.conf

JavaScript

httpd-vhosts.conf

JavaScript

Advertisement

Answer

It turns out I had added an unnecessary line in my .htaccess file of my api folder. Removal of this line fixed the problem and the debugger step cursor started working successfully.

Changes made

.htaccess

JavaScript

Bottom of php.ini (c:/wamp64/bin/apache/apache2.4.46/bin/php.ini)

JavaScript

launch.json

JavaScript

httpd.conf Middle of file

JavaScript

httpd-vhosts.conf

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement