Since the entire team has upgraded to Visual Studio 2015, the debugger no longer breaks on unhandled exceptions in JavaScript. However 1 of the 4 machines works fine and we're guessing this is because it's on IE10 and the rest of us are on IE11.
Anyway, to cover the obvious stuff:
All settings are identical between all machines, including the mycode.default.wwa.json in the JavaScript > JustMyCode folder in the Visual Studio 2015 installation directory
The default settings on the new Exception Settings window match the Exception settings in the old modal window from 2012
So to reproduce the problem, we just write any old bit of dodgy code in an external JS file (note that script blocks on the page itself are caught correctly):
ViewModel.js:
function something() {
foo();
}
something();
When JustMyCode is enabled, foo() will not be caught as an unhandled exception by the debugger. As soon as JustMyCode is disabled, the exception will be caught fine. So yeah, we can workaround this problem, but as soon as that's disabled, we lose actual .Net debugging.
Has anyone experienced this problem and/or found a solution? I've tried adding *.js to the MyCode section inside of the mycode.default.wwa.json file and I've also logged a bug on Connect, but I don't expect a fast answer from Microsoft on the matter.
Edit: So this only seems to happen when there's a query string on the end of the JS file, e.g. site.js?V=1234. If you remove the query string then the debugger catches exceptions as it did in Visual Studio 2012. Submitted a new repro and demo project to Microsoft.
It looks like the issue you are experiencing is related to the handling of unhandled exceptions in JavaScript when the JustMyCode option is enabled in Visual Studio 2015.
One possible solution to this problem is to disable the JustMyCode option in Visual Studio 2015. To do this, go to the Debug menu and select Options. In the Options dialog, go to the Debugging > General page and uncheck the "Enable Just My Code" option.
Alternatively, you can try adding the .js files that you want to debug to the "My Code" list in the Debugging > Just My Code page. This will allow the debugger to break on unhandled exceptions in those specific files, even when the JustMyCode option is enabled.
It is also possible that the issue is caused by a bug in Visual Studio 2015. If you have not already done so, you may want to submit a bug report to Microsoft using the Visual Studio Connect site. This will help Microsoft identify and fix the issue in a future update.