vscode-php-debug
vscode-php-debug copied to clipboard
Running current test case on remote server
I am wondering whether it is possible to run the currently opened test case on the remote server and then attach to Xdebug without using SSH for remote debugging? Perhaps via an URL that is called in the browser with the script name as argument as a "Listen for Xdebug launcher"?
What you can do is, if you have the code both on server and locally, run the script on the server (either from command line or from web server) and instruct Xdebug to connect to your PC. VSCode would in fact be showing your local code, but that should be the same as remote. You would probably need to play with "pathMappings".
There's a bunch of moving parts here...
Just add a "terminal" SSH connection inside your workspace
"terminal.integrated.profiles.windows": {
"SSH@dev": {
"args": [
"-A",
"-R",
"9003:localhost:9003",
"[email protected]"
],
"overrideName": true,
"path": "C:\\Programs\\Cygwin\\bin\\ssh.exe",
"color": "terminal.ansiCyan"
}
},
Then you will get both an actual terminal and xdebug connector. Then it's a matter of setting up correct tasks to run currently opened test case and connect to debugger.
Seems to be answered, closing.