You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, I see stack traces in the debug output:
ERR Cannot read properties of undefined (reading 'read'): TypeError: Cannot read properties of undefined (reading 'read')
at Derived._computeFn (http://localhost:3000/src/vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.ts?t=1740093639452:81:132)
at Derived._recomputeIfNeeded (http://localhost:3000/src/vs/base/common/observableInternal/derived.ts?t=1740052750953:213:27)
at Derived.get (http://localhost:3000/src/vs/base/common/observableInternal/derived.ts?t=1740052750953:191:14)
at Derived.readObservable (http://localhost:3000/src/vs/base/common/observableInternal/derived.ts?t=1740052750953:322:30)
at Derived.read (http://localhost:3000/src/vs/base/common/observableInternal/base.ts:27:21)
at Derived._computeFn (http://localhost:3000/src/vs/base/common/observableInternal/base.ts:55:27)
at Derived._recomputeIfNeeded (http://localhost:3000/src/vs/base/common/observableInternal/derived.ts?t=1740052750953:213:27)
at Derived.get (http://localhost:3000/src/vs/base/common/observableInternal/derived.ts?t=1740052750953:191:14)
at Derived.readObservable (http://localhost:3000/src/vs/base/common/observableInternal/derived.ts?t=1740052750953:322:30)
at Derived.read (http://localhost:3000/src/vs/base/common/observableInternal/base.ts:27:21)
However, it is difficult to act on them, as they refer to the out source, and not the original typescript files.
It would be very helpful if the source map was considered for these stacktraces.
Some implementation ideas:
Detect stack-like strings and rewrite them before they are written to the debug console
Implement a link detector in the debug console that opens the source mapped location (e.g. ./src/main.ts) instead of the link directly (http://localhost:3000/src/main.ts)
Add [[Location]] to the view when an Error is viewed, similar to functions (though this wouldn't work out of the box, as not the error object is logged, but the error string).
Register a cdp binding so that the debugee can translate stack traces on their own (if the binding is present). Additionally, the debugger could inject JS code that patches Error.stack to automatically consider stack traces
The text was updated successfully, but these errors were encountered:
hediet
changed the title
Consider Source Map For StackTraces
Consider Source Map For Stack Traces
Feb 21, 2025
Sometimes, I see stack traces in the debug output:
However, it is difficult to act on them, as they refer to the out source, and not the original typescript files.
It would be very helpful if the source map was considered for these stacktraces.
Some implementation ideas:
./src/main.ts
) instead of the link directly (http://localhost:3000/src/main.ts
)[[Location]]
to the view when anError
is viewed, similar to functions (though this wouldn't work out of the box, as not the error object is logged, but the error string).The text was updated successfully, but these errors were encountered: