Skip to content

Instantly share code, notes, and snippets.

@cramhead
Last active January 24, 2019 19:01
Show Gist options
  • Save cramhead/e62e222157eca18a1324cf330f31ae99 to your computer and use it in GitHub Desktop.
Save cramhead/e62e222157eca18a1324cf330f31ae99 to your computer and use it in GitHub Desktop.
  1. Debug mode Run the node process in debug mode set the npm start script to start in debug mode. This will send debugging information to port 5858 by default.
  scripts": {
   "start": "node --debug ."
  }
  1. Expose the port in the docker-compose file This allows the debugger running outside of docker to connect the port 5858
  2. Add a launch configuration
  {
    "name": "Docker: Attach to Node",
    "type": "node",
    "request": "attach",
    "port": 5858,
    "protocol": "legacy",
    "localRoot": "${workspaceFolder}",
    "remoteRoot": "/usr/src/app"
  }
  1. Restart docker-compose restart <service>
@toriaezunama
Copy link

toriaezunama commented Jan 24, 2019

  1. Look at "debug" script in the package.json of portal-api for an example of how to set this up
  2. If this is the same as the one in the onboarding document then fine
  3. I am not sure if restart reflects changes in the docker-compose file i would usedocker-compose up <service>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment