Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode + react native tools debugging errors on console.trace() #974

Closed
GenericJam opened this issue Apr 11, 2019 · 1 comment · Fixed by #976
Closed

VSCode + react native tools debugging errors on console.trace() #974

GenericJam opened this issue Apr 11, 2019 · 1 comment · Fixed by #976

Comments

@GenericJam
Copy link

Actual Behavior

  1. When debugging app through VSCode using React Native Tools causes the app to error when console.trace() invoked.

Expected Behavior

  1. Print out the stack trace.
  2. Don't assume stack trace === error

Software versions

  • React-Native VS Code extension version:
  • VSCode version: 1.33.0
  • OS platform and version: Mac OS Mojave
  • NodeJS version: 11.13.0
  • React Native version: 0.57.7
  • Expo SDK version (include if relevant):

Outputs (Include if relevant)

  • Output of the Debug Console (View -> Toggle Debug Console):
    console.trace()...
    ...trace....
    Trace
    at Console.trace (internal/console/constructor.js:336:11)...
    ...trace....
This also makes the app screen the red error screen rendering the app unusable.

I'm trying to make better debug messaging by writing a wrapper. By putting console.log somewhere else, it loses the original context so it loses the filename and line number. I'm trying to get that back with the console.trace() but VSCode seems to assume the only reason someone would want a stack trace is because of an error.

This operates as desired if run from command line and debugging via Chrome or React Native Debugger so it is VSCode specific.
@SounD120
Copy link
Contributor

Hi @GenericJam , v0.9.2 with fixes for console.trace() cases has just been released

@SounD120 SounD120 self-assigned this Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants