reactotron icon indicating copy to clipboard operation
reactotron copied to clipboard

Add line tracing into logging

Open lakhman opened this issue 7 years ago • 4 comments

Could we show where the log statement was executed from? - Like chrome dev tools - Filename:LinoNo.

also, when using console.tron.log() could we show the data type?

console.tron.log("1.23");
console.tron.log(parseFloat("1.23"));
console.tron.log(1.23);

These all output 1.23 - it would be great to know which type is returned.

Awesome project, very efficient compared to all other RN debuggers. 👍

lakhman avatar Dec 04 '16 17:12 lakhman

Great suggestion. The only way I know how to do this is to trigger an exception, catch it, and source map it. I wonder if theres another way? I'll look into this.

skellock avatar Dec 04 '16 19:12 skellock

@skellock

const err = new Error
console.tron.reportError(err)

Obviously we wouldn't want to report it as an error but if we extract out the symbolcating bit then this gives you the stack trace in the form that we send up on exception

rmevans9 avatar Mar 23 '17 00:03 rmevans9

Any news on this ? That's quite the only feature that I really miss in Reactotron :)

bockc avatar Jan 14 '21 13:01 bockc

In dire need of tracing to know which file printed log from which line

Soft-Gurus avatar Apr 21 '23 16:04 Soft-Gurus