Hi All,
I am trying to detect a tricky and hard to reproduce issue in my code and I need to obtain call stack programmatically. Is there anything is ext-js-4 that could help in doing that?
Regards,
Bartek
Hi All,
I am trying to detect a tricky and hard to reproduce issue in my code and I need to obtain call stack programmatically. Is there anything is ext-js-4 that could help in doing that?
Regards,
Bartek
You can use a try/catch block
Mitchell Simoens @LikelyMitch
Modus Create, Senior Frontend Engineer
________________
Need any sort of Ext JS help? Modus Create is here to help!
Check out my GitHub:
https://github.com/mitchellsimoens
Hmmm - there is no exception involved - it is more about seeing from where certain methods are invoked and why. So if they get called and hist certain condition I would like to see the full call stack in an alert or logs.
If you just want to kick off the debugger you can add a breakpoint or use the debugger statement in your code. Most browsers support conditional breakpoints so that they only pause execution if some condition is met.
However, to answer your question directly:
Code:var stack = new Error().stack
You can google for 'javascript stack trace' and you will find quite a few pages on different ways to do it.
Mitchell Simoens @LikelyMitch
Modus Create, Senior Frontend Engineer
________________
Need any sort of Ext JS help? Modus Create is here to help!
Check out my GitHub:
https://github.com/mitchellsimoens
Since I need to capture a stacktrace when the issue happens and there is a very little chance to do so when debugger is on I used the following library: https://github.com/eriwen/javascript-stacktrace