Last active
June 12, 2018 16:55
-
-
Save superzadeh/a129a5d8e5c0d40a1b6cc73b8e66bf69 to your computer and use it in GitHub Desktop.
Debug config VSCode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:carbon-slim | |
EXPOSE 9228 | |
WORKDIR /app | |
# Install packages | |
ADD ./package.json ./yarn.lock /app/ | |
RUN cd /app && yarn install | |
ADD . /app | |
CMD [ "yarn", "start" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Docker: attach", | |
"type": "node", | |
"request": "attach", | |
"port": 9228, | |
"restart": true, | |
"sourceMaps": false, | |
"address": "localhost", | |
"localRoot": "${workspaceRoot}", | |
"remoteRoot": "/app", # /app is the path where you copy the ${workspaceRoot} inside the container. make sure they match, or debug won't work. | |
"protocol": "inspector" | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "yourpackage", | |
"version": "1.0.0", | |
"main": "server.js", | |
"scripts": { | |
"start": "node --inspect=0.0.0.0:9228 server.js", | |
"start:watch": "nodemon --inspect=0.0.0.0:9228 server.js", | |
} | |
"dependencies: { | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// read https://github.com/Microsoft/vscode-chrome-debug#getting-started to setup Google Chrome correctly | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "chrome", | |
"request": "launch", | |
"name": "Launch Chrome against localhost", | |
"webRoot": "${workspaceRoot}", | |
"userDataDir": false | |
}, | |
{ | |
"type": "chrome", | |
"request": "attach", | |
"name": "Attach to Chrome", | |
"port": 9222, | |
"url": "http://localhost:3010", | |
"webRoot": "${workspaceRoot}" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment