Welcome Guest, Not a member yet? Register   Sign In
XDebug with Spark on VSCode
#1

I want to share these parameters on launch.json:
Code:
{
    "name": "CI4 Spark XDebug",
    "type": "php",
    "request": "launch",
    "runtimeArgs": [
        "spark",
        "serve",
        "-dxdebug.mode=debug",
        "-dxdebug.start_with_request=yes",
        "-S",
        "localhost:8080",
    ],
    "env": {
        "XDEBUG_MODE": "debug",
        "XDEBUG_SESSION": "factor",
    },
    "externalConsole": false,
    "program": "",
    "cwd": "${workspaceRoot}",
    "port": 9003,
    "serverReadyAction": {
        "action": "openExternally",
        "killOnServerStop": false
}
The good, it works!
The bad, sometimes you have to restart the debug (CTRL+SHIFT+F5) for the breakpoints to work.
The bad(1), the debug process keeps alive even when VSCode is closed (you have to kill the process).
Sharing any improvements to this config will be appreciated.
Thanks.
Reply
#2

(02-03-2024, 08:25 AM)rdconsolo Wrote: I want to share these parameters on launch.json:
Code:
{
    "name": "CI4 Spark XDebug",
    "type": "php",
    "request": "launch",
    "runtimeArgs": [
        "spark",
        "serve",
        "-dxdebug.mode=debug",
        "-dxdebug.start_with_request=yes",
        "-S",
        "localhost:8080",
    ],
    "env": {
        "XDEBUG_MODE": "debug",
        "XDEBUG_SESSION": "factor",
    },
    "externalConsole": false,
    "program": "",
    "cwd": "${workspaceRoot}",
    "port": 9003,
    "serverReadyAction": {
        "action": "openExternally",
        "killOnServerStop": false
}
The good, it works!
The bad, sometimes you have to restart the debug (CTRL+SHIFT+F5) for the breakpoints to work.
The bad(1), the debug process keeps alive even when VSCode is closed (you have to kill the process).
Sharing any improvements to this config will be appreciated.
Thanks.
I just tried it and it works quite well. If just rebooting can debug it then it's not a problem for me. Thank you!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB