NativeScript / ios-jsc

NativeScript for iOS using JavaScriptCore
http://docs.nativescript.org/runtimes/ios
Apache License 2.0
299 stars 59 forks source link

feat: Error.prepareStackTrace method support #1180

Closed vtrifonov closed 5 years ago

vtrifonov commented 5 years ago

Related to #1135

Added support for Error.prepareStackTrace method similar to the one in V8 and changed the format of the stack trace to be the same as android (also as node and browsers) with at ...

PR Checklist

farfromrefug commented 5 years ago

@vtrifonov @mbektchiev First thank for that PR! Now i think we need to discuss a bit more on how to actually use this for the user. It is not easy to actually make it all work. But i managed to end up with this:

Screen Shot 2019-08-23 at 14 18 08

The important thing is that i get real ts file absolute path. The great thing about this is that it allow ctrl+click to go the line/column. So useful in dev!

Now there are a few steps to make it work:

That should be good enough. For now i got this to work perfectly on Android.

Now some issues:

Maybe we can discuss all that on slack. Would love to make it work consistently on iOS and Android. I could them publish a nativescript-source-map-support plugin.

Would it be possible for wepback templates to be updated to support this?