在Visual Studio中调试javaScript。第一次机会例外

时间:2014-02-11 09:40:42

标签: javascript jquery c++ visual-studio debugging

我在visual studio(C ++)有一个项目。项目的前端是用javaScript编写的,它是在chtmlview窗口中运行的C ++的简单GUI。

当项目在visual studio中运行时,在调试模式下,我得到以下内容:

    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..

控制台上有这个spat的页面。我发现很难找到调试代码的方法。事实上它必须在chtmlview窗口中运行,(而不是像Chrome这样可爱的东西,具有漂亮的调试能力......“是的,微软......你让我失望了),让它变得更难。我正在使用在我的项目中我的jQuery的最新版本,除了我有最少量的Try / Catches。

任何人都必须调试在chtmlview中运行的javaScript,这是非常感激的。

其他症状包括窗户在夜间跑步后跑得非常缓慢。

(注意:我基本上是这个项目的脚本猴子,在C ++方面很少/没有输入,但最近重写了所有的javaScript;所以你可以看到我的这些例外让我很尴尬!)。< / p>

1 个答案:

答案 0 :(得分:2)

在Visual Studio 2015中,您可以配置希望调试器处理的异常。

在以下链接中,您可以看到,如何配置它: http://blogs.msdn.com/b/visualstudioalm/archive/2015/01/08/understanding-exceptions-while-debugging-with-visual-studio.aspx

阅读

部分
  

配置调试器以中断第一次机会异常

我希望它可以帮助你或任何人。