How to handle script errors in Durandal SPA

484 views Asked by At

When you get a script error somewhere in your SPA code, entire app becomes totally unresponsive and you cannot navigate to any other pages(views). It seems durandal just freezes! (only way out is to hit refresh to start SPA again)

What are some good ways to handle these unhandled exception scenarios in Durandal SPA?

Thoughts?

Thanks!

1

There are 1 answers

1
Jan R On

My experience is to use Chrome as main tool for debugging since I find the tools easiest to use. However, now and then Durandal reports that an error has occured. Not where or why it just stops and hangs as you describe. Then I try the same in Firefox with the Firebug plugin. Then the browser usually stops the code at the correct place.

I assume that you have activated debug mode in your main.js?