nativescript-cli icon indicating copy to clipboard operation
nativescript-cli copied to clipboard

NS7 Console log, stack traces/errors not displaying context (module name, line number, etc)

Open mdjamal opened this issue 4 years ago • 6 comments

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 7.0.8

Describe the bug After updating to NS7 and when debugging app with tns debug iOS/android, and attaching the Chrome debugger to the app, error contexts or even simple console.log statements are not printed with the source context. This makes any errors thrown by the app impossible to debug.

To Reproduce Run app using either hardware or emulator: tns run iOS then attach debugger: tns debug iOS

launch Chrome or Chromium, then paste devtools link in address bar: chrome-devtools://devtools/bundled/inspector.html?experiments=true&ws=localhost:40000

Observe the console

mdjamal avatar Sep 25 '20 02:09 mdjamal

I'm experiencing same problem. I can't debug my app because of this issue. I'm currently using CLI 7.0.10

paul-castro avatar Oct 25 '20 21:10 paul-castro

any update on this?

paul-castro avatar Nov 05 '20 01:11 paul-castro

Same problem here, running tns run ios on simulator, and console shows the errors but no stack trace. NS7 / tns-ios 6.5.3

michael-dots avatar Nov 15 '20 12:11 michael-dots

any update on this?

Nahiduzzaman avatar Apr 19 '21 16:04 Nahiduzzaman

Is this feature not implemented? or is this a setting error what should I fix in my environment?

abdallahkadour avatar Dec 08 '21 10:12 abdallahkadour

If using angular, seems like in some cases the stack traces are hidden, and you may need to explicitly print out the error stack when handling it in an Error Handler.

There was a thread on Discord with more details here: https://discord.com/channels/603595811204366337/887996626273202226/913381223978659861

In all my tests throwing an error has shown the full stack-trace, and I wasn't able to reproduce the scenario where they are missing...

rigor789 avatar Dec 08 '21 11:12 rigor789