1

So I am trying to debug my app and I am trying to determine what is causing my error but I cannot simply look at Chrome's console because it only shows me which function last called it. I am trying to trace the whole path from an event to crash. Is there a way to do such a thing? Thanks!

Georgi Angelov
  • 4,338
  • 12
  • 67
  • 96
  • 2
    Can't you turn on "Pause on all Exceptions" in your developer tools _Sources_ tab? Then the script should pause on your error and you can look at the call stack on the right hand side (of the Sources tab still). – Default Jul 24 '13 at 13:58
  • The solution which @Barmar proposed worked perfectly. However, your solution sounds very promising as well! I will definitely give it a try next time! – Georgi Angelov Jul 24 '13 at 16:59

1 Answers1

2

Set a breakpoint at the beginning of the event handler function. When the event occurs, the program will stop in the debugger. Then you can use the single-step buttons to step through the code.

See How to step through code in Google chrome javascript debugger

Community
  • 1
  • 1
Barmar
  • 741,623
  • 53
  • 500
  • 612