1

I'm debugging Node.js application on Visual Studio 2015. It works great but there is one issue I find a big time-waster. If my program runs into an error I see the error on the console, but debugger does NOT stop where the error happened. I have to look up the line-number from the console-log then locate that line in the source-code.

It works better when debugging browser-based JavaScript on Visual Studio, the debugger halts whenever an error is thrown, which is REALLY great.

Is it possible to get the Visual Studio debugger to halt when the debugged program running on Node.js throws an error?

1 Answer 1

3

You could install the Node.js Tools for Visual Studio and use the Exception settings windows under Debug->Windows. It would throw or catch the Exception.

http://nodejstools.codeplex.com/discussions/538432

enter image description here

Sign up to request clarification or add additional context in comments.

3 Comments

@Panu Logic, Exception settings window could help us throw the Exception during debugging, is it the solution you want to get?
Yes. Exactly the solution. Thanks a lot
I now have all the exception types checked. However I still don't get a halt when throw is called explicitly at the point where it is called, rather the halt happens in Node.js code where the loading of the module failed. By that time the location where throw was called is lost and needs to be figured out by looking at line-numbers on the console.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.