Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging javaScript in Visual studio. First chance exceptions

I have a project in visual studio (C++). The front end of the project is written in javaScript, it's a simply GUI for the C++ running in a chtmlview window.

When the project is run in visual studio, in debug mode, I'm getting the following:

    First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc524..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6d0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc444..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6b0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc434..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6a0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc3ec..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6c0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc524..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6d0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc444..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6b0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc434..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6a0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc3ec..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6c0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc524..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6d0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc444..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6b0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc434..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6a0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc3ec..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6c0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc524..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6d0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc444..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6b0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc434..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6a0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc3ec..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6c0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc524..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6d0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc444..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6b0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc434..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6a0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc3ec..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6c0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc524..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6d0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc444..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6b0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc434..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6a0..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc3ec..
First-chance exception at 0x75a0812f in MyProject.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x001fc6c0..

There are literally pages of this spat out of the console. I'm finding it very hard to find a way to debug the code. The fact that it must run in a chtmlview window, (Rather than something lovely like Chrome, with its beautiful debugging abilities... "Yes, Microsoft... You let me down), makes it even harder. I'm using the latest version of my jQuery in my project, apart from that I have a minimum amount of Try/Catches.

Anyone pointed from people who have had to debug javaScript running in chtmlview, that would be much appreciated.

Other symptoms include the window running horribly slowly after being left to run over night.

(Note: I'm basically the script monkey on this project, have little/no input on the C++ side of things but have recently rewritten all the javaScript; So you can see my these exceptions are embarrassing me!).

like image 736
User2 Avatar asked Feb 11 '14 09:02

User2


People also ask

How do I allow exceptions in Visual Studio?

With a solution open in Visual Studio, use Debug > Windows > Exception Settings to open the Exception Settings window. Provide handlers that respond to the most important exceptions.

What is first chance exception?

When an application is being debugged, the debugger gets notified whenever an exception is encountered. At this point, the application is suspended and the debugger decides how to handle the exception. The first pass through this mechanism is called a "first chance" exception.

How do I stop Visual Studio from breaking on exception?

To turn off stop on exceptions press " Ctrl + Alt + E ". This will open the Exceptions window . Untick "Common Language Runtime Exceptions - Thrown". That would prevent it from pausing from within the delegate, but not when it's rethrown on Wait .


1 Answers

In Visual Studio 2015, you can configure which exceptions you want the debugger to handle.

In following link you can see, how to configure it: http://blogs.msdn.com/b/visualstudioalm/archive/2015/01/08/understanding-exceptions-while-debugging-with-visual-studio.aspx

Read the section

Configuring the debugger to break for first chance exceptions

I hope it can help you or anyone.

like image 142
Jacobi Avatar answered Oct 19 '22 18:10

Jacobi