Can you get a proper stacktrace with ionic 2?

#1

When I’m using ionic in the browser (ionic serve) to develop my app, I’ve found that when debugging errors I cannot rely on the stacktrace whatsoever, as it only ever shows files like build.js polyfill.js etc (which come wiht the framework). I am yet to have an error which is caused by my code, actually tell me the file and line from which the error occured. Is this something planned for future releases, or is there a way to do it now? The current trace is never helpful.

#2

@acopley89 I would like to know this too. Did you ever find out the solution?

#3

Doesn’t IonicErrorHandler help you?

#4

It is precisely the IonicErrorHandler which I am referring to as being unhelpful. I am yet to have a single stacktrace as a result of an error which actually points to an error in a specific file in my code.

The only information a stacktrace gets you is all of the calls made to methods in build.js and polyfills.js, which is the framework code, and so in no way can I use this to identify where my error has come from.

#5

Sorry for digging up this thread, but I never find any info on this, which makes me wonder if it works for most people and therefore they don’t even understand the question. The second explanation would be that it works for nobody and everybody finds it normal to have useless stacktraces, which seems unilkely :smiley:

So just to get the question out of the way. Is it actually possible to have useful stacktraces ? With actual code information, not vendor.js, polyfill.js and build.js and the likes. And if it is, what are the common ways that we screw this up ?

1 Like