Debugging dependency from a jasmine-node project


I have a standard Node.js project, "A", that I want to test.

I've setup another Jasmine-node project, "A-tests", by:
- creating an empty project,
- adding a new Run/Debug configuration that runs Jasmine-node on the current directory
- "npm install"ing the "A" project into the "A-tests" project

Things are quite good, I can:
- run the tests and see the colorful Jasmine-node output
- debug the code of the tests

But I can't debug the code of the "A" project.
I can't step into a function of the "A" project.

As an example I have this kind of tests:
var a = require("A");

it("should work", function(done)
        a.doSomething("hello", function(err, answer)

I can't step into the "doSomething" function, I can only expect it will run to completion and callback into the test where I can debug.

So how to enable debugging of the "A" project from the "A-test" project.

Thanks in advance for any help.

Comment actions Permalink


please can you provide more information on your setup? Are you using jasmine-node? But it's not yet supported ( Please can you clarify what Run/Debug configuration is used by you for running Jasmine-node?

Comment actions Permalink

Hi Elena and thanks for your answer.

seems like Jasmine integration in WebStorm is a pain, so I give up, simpler is better. :)
I'll use Mocha instead which is officially supported.

With Mocha things are far better: now I can set some breakpoints in my library code.

But I still can't step into directly from the tests files.
This is not a big issue as I can set a breakpoint on the dependency side but I'd like to hear from you if you have any idea to have a full integration.


Comment actions Permalink


works for me when using Mocha - I can step into the tested module when debugging specs
Please can you attach a sample project that shows up your issue?

Comment actions Permalink

Hello Elena,

I've tested from scratch with new projects and I can't reproduce the issue. :/
So there is something wrong with my current projects.

But it's a minor nuisance, so we can close the issue.
I'll come back if I have more clues about it.

Thanks for your help.


Please sign in to leave a comment.