question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using `console.trace` with value outputs `[object Object]`

See original GitHub issue

From https://github.com/TypeStrong/ts-node/issues/441. I quickly narrowed it down to this module as I can disable source map support and the output becomes correct - mirroring node.js functionality. Reproduction from ts-node:

console.trace('a');
[object Object]
    at Object.<anonymous> (/Users/blakeembrey/Projects/tmp/t.ts:1:9)
    at Module._compile (module.js:573:30)
    at Module.m._compile (/Users/blakeembrey/Projects/GitHub/TypeStrong/ts-node/src/index.ts:413:23)
    at Module._extensions..js (module.js:584:10)
    at Object.require.extensions.(anonymous function) [as .ts] (/Users/blakeembrey/Projects/GitHub/TypeStrong/ts-node/src/index.ts:416:12)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Function.Module.runMain (module.js:609:10)
    at Object.<anonymous> (/Users/blakeembrey/Projects/GitHub/TypeStrong/ts-node/src/_bin.ts:177:12)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
SystemDisccommented, Jun 5, 2020

This is still broken

1reaction
legraphistacommented, Mar 23, 2019

Any updates? This is still an issue. console.trace and Error.captureStackTrace are broken.

Read more comments on GitHub >

github_iconTop Results From Across the Web

console.trace() - Web APIs - MDN Web Docs
The console.trace() method outputs a stack trace to the Web console. ... See Stack traces in the console documentation for details and examples....
Read more >
How to get result of console.trace() as string in javascript with ...
Show activity on this post. console. trace() outputs its result on console. I want to get the results as string and save them...
Read more >
console.trace — A better alternative to console.log
You can use the console.log() method to output messages to the web console. The message may be a single string (with optional substitution ......
Read more >
What is console.trace in JavaScript? - Educative.io
console.trace accepts multiple arguments so that we can log data and stack traces in the same call. For example, if we need to...
Read more >
How to use the JavaScript console: going beyond console.log()
console.trace() outputs a stack trace to the console and displays how the code ended up at a certain point. There are certain methods...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found