[nodejs] Node debugger as Chrome plugin

296 views
Skip to first unread message

John Wright

unread,
May 23, 2010, 12:28:05 PM5/23/10
to nodejs
I was thinking a good idea would be looking into taking the work done
on ndb and the open source Chrome JS debugger to produce a similar
plugin for Chrome that would remotely debug running Node programs.
I wonder if there is even a hack to integrate Node debugging into the
existing Chrome debugger but a separate plugin would probably be
necessary. Has anyone else had similar thoughts? It doesn't seem
like this would be too far out of reach. The advantages would be:

- Graphical debugging without Eclipse.
- Attracting client-side JS programmers who are used to Firebug style
debuggers to Node.
- Reusing code in the existing Chrome debugger.


--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.

Scott Taylor

unread,
May 23, 2010, 2:39:28 PM5/23/10
to nod...@googlegroups.com
On May 23, 2010, at 12:28 PM, John Wright wrote:

I was thinking a good idea would be looking into taking the work done
on ndb and the open source Chrome JS debugger to produce a similar
plugin for Chrome that would remotely debug running Node programs.
I wonder if there is even a hack to integrate Node debugging into the
existing Chrome debugger but a separate plugin would probably be
necessary.   Has anyone else had similar thoughts?  It doesn't seem
like this would be too far out of reach.   The advantages would be:



Yeah, it's certainly something I've been exploring.  As far as I can tell, we'd have to write a layer on top of ndb to support the chrome dev tools protocol:


It looks like you'd also have to start chrome with a special flag.  On OS X, that'd be:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-shell-port=9222

Internally, it looks like once you select a tab, debugging would use exactly the same protocol as we are using for the v8 embedded into node:


I'd certainly accept a patch for it if it worked and had code coverage.

Best,

Scott


- Graphical debugging without Eclipse.
- Attracting client-side JS programmers who are used to Firebug style
debuggers to Node.
- Reusing code in the existing Chrome debugger.


--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.

John Wright

unread,
May 23, 2010, 9:34:01 PM5/23/10
to nodejs
That's sounds more promising than I thought. I will let you know if
I tackle this Scott, thanks, and thanks for ndb!
> > For more options, visit this group athttp://groups.google.com/group/nodejs?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/nodejs?hl=en.

dsbeam

unread,
May 24, 2010, 3:24:34 PM5/24/10
to nodejs
+1 for server-side profiling that mimics client-side consoles like
firebug or developer tools.

Additionally, at Google I/O they were showing a plug-in that can
combine server-side and client-side metrics in one console called
Speed Tracer. If you're looking to write a plug-in for a pre-existing
solution, it'd allow server-side Node metrics to bubble up to this
console. Here's the link - http://code.google.com/webtoolkit/speedtracer/.

I'm a little pressed for time right now, so if you guys were looking
for something else, sorry to misunderstand this thread.

Eric Fong

unread,
Jun 17, 2010, 10:19:11 PM6/17/10
to nodejs
Any news for this projects? Currently, want to debug a remote node
server (a bug only happen in that machine).
And found that eclipse debugger only can be used for local node
server.
If you can make the node debugged by chrome debugger. Please tell me.


On May 24, 12:28 am, John Wright <mrjjwri...@gmail.com> wrote:
> I was thinking a good idea would be looking into taking the work done
> on ndb and the open sourceChromeJS debugger to produce a similar
> plugin forChromethat would remotelydebugrunning Node programs.
> I wonder if there is even a hack to integrate Node debugging into the
> existingChromedebugger but a separate plugin would probably be

Scott Taylor

unread,
Jun 17, 2010, 10:34:07 PM6/17/10
to nod...@googlegroups.com

On Jun 17, 2010, at 10:19 PM, Eric Fong wrote:

> Any news for this projects? Currently, want to debug a remote node
> server (a bug only happen in that machine).
> And found that eclipse debugger only can be used for local node
> server.
> If you can make the node debugged by chrome debugger. Please tell me.

Are you debugging server side remote node.js backend, or a chrome/browser-based front end?

You can debug remote node instances as long as you start them with node --debug (or --debug-brk). See ndb --help and node --help | grep debug.

Scott

Zoka

unread,
Jun 18, 2010, 12:08:25 AM6/18/10
to nodejs
You can debug remote Node app with Eclipse debugger, but you have to
run 2 instances of TCP proxy (tcpproxy.js), one on local machine an
one on the remote. Have look at the
http://wiki.github.com/ry/node/using-eclipse-as-node-applications-debugger

Same proxy arrangement can be used with ndb.

Zoka

Chris Winberry

unread,
Jun 18, 2010, 7:09:47 AM6/18/10
to nod...@googlegroups.com

Might be simpler to just use the tunnel option of ssh or even ncat.

On Jun 18, 2010 12:08 AM, "Zoka" <ztom...@gmail.com> wrote:

You can debug remote Node app with Eclipse debugger, but you have to
run 2 instances of TCP proxy (tcpproxy.js), one on local machine an
one on the remote. Have look at the
http://wiki.github.com/ry/node/using-eclipse-as-node-applications-debugger

Same proxy arrangement can be used with ndb.

Zoka



On Jun 18, 12:19 pm, Eric Fong <eri...@gmail.com> wrote:

> Any news for this projects? Currently, ...

Reply all
Reply to author
Forward
0 new messages