Debugging karma using standalone V8 VM

683 views
Skip to first unread message

mimadrel...@gmail.com

unread,
Feb 3, 2014, 4:53:30 AM2/3/14
to karma...@googlegroups.com
Hi there, I am trying to use the Nodeclipse debugger to step through a karma test. I have set up a debug configuration listening to the port karma is starting

    // web server port
    port: 8089,

but I am getting this exception:

Nodeclipse/chromedevtools failed to connect to Standalone V8 VM ( Check Help (F1) and Support http://www.nodeclipse.org/#support )
. Info:
Timed out waiting for handshake

My understanding is that node needs to be started in debug mode for V8 VM. but karma is spinning out its on instance of node and I don't have control over that. Could that be the reason?

Any ideas anyone?

Kind regards,
David

Vojta Jína

unread,
Feb 4, 2014, 2:29:52 PM2/4/14
to karma...@googlegroups.com
Hi David,

you wanna debug your tests, not Karma, right?
In that case, you don't need to debug Node.js, but Chrome.

You need to start Chrome with remote debugger. The easiest way to do this with WebStorm (I asume Eclipse has something similar) is:
- start Karma without any browser
- make WebStorm to start the browser with remote debugger (make open the url when Karma is running; eg. http://localhost:9876/debug.html)

This (pretty old) screen cast shows how to do it:

Also, I believe the latest WebStorm/Karma plugin makes this to work out-of-the-box.

V.


--
You received this message because you are subscribed to the Google Groups "karma-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to karma-users...@googlegroups.com.
To post to this group, send email to karma...@googlegroups.com.
Visit this group at http://groups.google.com/group/karma-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/karma-users/68e2725f-eba4-4d23-9d76-3e04b1f5c222%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages