apify / devtools-server

Runs a simple server that allows you to connect to Chrome DevTools running on dynamic hosts, not only localhost.
Apache License 2.0
15 stars 5 forks source link

Support for nodejs #1

Open SamuelScheit opened 4 years ago

SamuelScheit commented 4 years ago

I want to debug my local nodejs application, but on the DevTools Server Website I get following error: Error: Cannot read property 'match' of undefined My node index.js file:

const server = new DevToolsServer({
    containerHost: "127.0.0.1:9229",
    devToolsServerPort: 9229,
    insecureConnection: true,
});
await server.start();

and start it with: node --inspect=0.0.0.0:9222 index.js

mnmkng commented 4 years ago

We never tested this library with Node inspector, as it was made for connecting to browsers. It could probably work, but I can't promise any time frame for a fix/update, because we're quite busy with other stuff at the moment.

I'm curious, what is the use case for debugging with this package locally, instead of connecting directly from Chrome?

SamuelScheit commented 4 years ago

I wanted to remote debug my production program, on another server and eventually got it to work with a ssh port forward:

ssh -L 9222:localhost:9229 user@example.org

But it would be convenient to remote debug it from my phone/browser without the connection process.