Skip to content

Instantly share code, notes, and snippets.

@rudijs
Created October 20, 2019 04:35
Show Gist options
  • Save rudijs/2f4cdecf3f04a2ae3f9aa5e5d6e80812 to your computer and use it in GitHub Desktop.
Save rudijs/2f4cdecf3f04a2ae3f9aa5e5d6e80812 to your computer and use it in GitHub Desktop.
vscode debugger launch.json samples for nodejs and PHP
// express.js or CLI program
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}/index.js"
}
]
}
// create-react-app
// https://medium.com/@auchenberg/live-edit-and-debug-your-react-apps-directly-from-vs-code-without-leaving-the-editor-3da489ed905f
{
"version": "0.2.0",
"configurations": [
{
"name": "Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000",
"webRoot": "${workspaceRoot}/src"
}
]
}
// PHP app running in a vagrant VM
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"pathMappings": {
"/vagrant": "${workspaceRoot}"
},
"port": 9000,
"log": true
}
]
}
// php.ini xdebug settings for http
[xdebug]
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_port=9000
;xdebug.remote_connect_back=1
xdebug.remote_host=192.168.33.1
// php.ini xdebug settings for the CLI
[xdebug]
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_port=9000
xdebug.remote_host=192.168.33.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment