Configure debugging from outside the container
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
### Visual Studio Code ###
|
### Visual Studio Code ###
|
||||||
.vscode
|
.vscode
|
||||||
|
# Except launch.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
|
||||||
### Node ###
|
### Node ###
|
||||||
# Logs
|
# Logs
|
||||||
|
|||||||
16
.vscode/launch.json
vendored
Normal file
16
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Docker: Attach to Node",
|
||||||
|
"type": "node",
|
||||||
|
"request": "attach",
|
||||||
|
"restart": true,
|
||||||
|
"port": 9229,
|
||||||
|
"address": "localhost",
|
||||||
|
"localRoot": "${workspaceFolder}",
|
||||||
|
"remoteRoot": "/app",
|
||||||
|
"protocol": "inspector"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -3,3 +3,5 @@ version: "3.7"
|
|||||||
services:
|
services:
|
||||||
bot:
|
bot:
|
||||||
command: sh -c "npm install && npm run dev"
|
command: sh -c "npm install && npm run dev"
|
||||||
|
ports:
|
||||||
|
- "9229:9229"
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"dev": "nodemon index.js"
|
"dev": "nodemon --inspect=0.0.0.0:9229 index.js"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
|||||||
Reference in New Issue
Block a user