vscode-php-debug icon indicating copy to clipboard operation
vscode-php-debug copied to clipboard

php.debug.startWithStopOnEntry

Open nesar77 opened this issue 2 years ago • 7 comments

PHP version: 7.4.33 (cli) Xdebug version: 3.1.2 VS Code extension version: 1.34..0

Your launch.json:

{
    // Usare IntelliSense per informazioni sui possibili attributi.
    // Al passaggio del mouse vengono visualizzate le descrizioni degli attributi esistenti.
    // Per altre informazioni, visitare: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9000,
            "hostname": "0.0.0.0"
        }
    ]
}

Xdebug php.ini config:

[xdebug]
;zend_extension="/usr/lib/php/20190902/xdebug.so"
xdebug.mode=debug
xdebug.discover_client_host=1
xdebug.client_port=9000
xdebug.start_with_request=yes
xdebug.idekey=VSCODE
;xdebug.log = /var/log/xdebug.log

Using F5 command I'm not able to start the debugger because I'm getting the following error: command 'php.debug.startWithStopEnrty" not found

nesar77 avatar Nov 23 '23 17:11 nesar77

Does it work if you click on the run button?

zobo avatar Nov 23 '23 17:11 zobo

Yes, but the debug starts immediately and not on request.

nesar77 avatar Nov 23 '23 17:11 nesar77

Thats probably the "play" button on the right side of the editor? How about the play button on the left, when you open the debug side menu. Sorry, can't give you a screenshot, I'm on the phone. https://code.visualstudio.com/docs/editor/debugging (left side)

zobo avatar Nov 23 '23 17:11 zobo

Also, do you have any other PHP extensions installed?

zobo avatar Nov 23 '23 17:11 zobo

Using the toolbar on the left side I'm able to start the debug correcly. I've installed the XDebug and Intelephense extensions.

nesar77 avatar Nov 23 '23 19:11 nesar77

Thanks. Will investigate.

zobo avatar Nov 23 '23 19:11 zobo

Hm. What I did last version was that I renamed the command php.debug.startWithStopOnEntry to extension.php-debug.startWithStopOnEntry. In either case, that shouldnot be bound to F5. Try to open one of the "keyboard shortcuts" commands (ctrl+shift+p) and see if you can find the command php.debug.startWithStopOnEntry.

zobo avatar Nov 23 '23 21:11 zobo