Thursday 4 May 2017

Node Debug From Vagrant

Unable to remote debug a node server running on a Vagrant box in Chrome from my host machine. The server is configured to run on port 8123.

Node Version: 7.10.0

In Vagrantfile:

config.vm.network :forwarded_port, host: 9229, guest: 9229
config.vm.network :forwarded_port, host: 8123, guest: 8123

From my vagrant box I run:

$ node --inspect index.js
Debugger listening on port 9229.
Warning: This is an experimental feature and could change at any time.
To start debugging, open the following URL in Chrome:
chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:9229/84085f07-dc42-4e1e-bdd8-532e6dc5c4c6
--- Customer Service---
Connecting to customer repository...
Connected. Starting server...
Server started successfully, running on port 8123.

When I try to access the url in Chrome from my host machine while I don't get an error the sources tab is empty.

Screenshot of devTools



via Geoffrey Richey

No comments:

Post a Comment