Take the 2-minute tour ×


The problem is, there are pages on the internet that throw JavaScript errors, and (for some reason) cause an unhandled exception to bubble up through the .NET application, as well.

My question is: Where do I catch JavaScript exceptions/errors when using a <WebView>?

share|improve this question
did you ever figure this out? –  justin.m.chase Jul 7 '12 at 22:26
@justin.m.chase Nope. –  SpikeX Jul 8 '12 at 0:35
What's bizarre is that they don't even seem to get bubbled up into the application unhandled event. I have a debugger attached yet when bad js is executed it prompts me to attach a debugger to what seems like the same process and it will actually take me to the location in the js where the exception happens. I have no idea how to prevent it or handle it... –  justin.m.chase Jul 8 '12 at 5:01
Report it to Microsoft, they are supposed to provide an error handler on web view. –  Akash Kava Jan 2 '13 at 19:42

1 Answer 1

up vote 21 down vote accepted

I had the same problem. it was somehow related to just-in-time debugging for Scripts. Try the following (from VS 2012): Uncheck the Scripts box in Debug -> Options and Settings -> Debugging -> Just in time

Worked for me.

share|improve this answer
Any idea how to do this in VS 2013? –  Markus Johnsson Jun 17 at 12:26
I have a HTML app that uses iframe for Web context operation (ms-appx-web://) and Javascript errors in the iframe causes the whole app to crash. The Visual Studio settings don't work, since it is Waahost.exe that doesn't like it. So inside or outside Visual Studio the app will still crash. –  icelava Oct 29 at 5:49

Your Answer


