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
I have quite complex remote debug behavior of a python script using debugpy and Theia 1.55.1.
Bug Description:
When I launch the debugging an exceptions occurs at:
logger-protocol.js:97 2025-03-03T08:41:11.187Z root ERROR fetchFrames failed: TypeError: Cannot read properties of undefined (reading 'toString')
at r.withPath (https://localhost:8443/ide/bundle.js:2:8399171)
at a.toUri (https://localhost:8443/ide/bundle.js:2:3186482)
at s.getSource (https://localhost:8443/ide/bundle.js:2:7810185)
at t.DebugStackFrame.update (https://localhost:8443/ide/bundle.js:2:9996831)
at t.DebugThread.doUpdateFrames (https://localhost:8443/ide/bundle.js:2:6856289)
at https://localhost:8443/ide/bundle.js:2:6855626
It turns out that in debug-source.ts at line 83 the raw.name! is undefined:
static toUri(raw: DebugProtocol.Source): URI {
if (raw.sourceReference && raw.sourceReference > 0) {
return new URI().withScheme(DEBUG_SCHEME).withPath(raw.name!).withQuery(String(raw.sourceReference)); // <-- Usage of name without check
}
if (!raw.path) {
throw new Error('Unrecognized source type: ' + JSON.stringify(raw));
}
if (raw.path.match(SCHEME_PATTERN)) {
return new URI(raw.path);
}
return new URI(Uri.file(raw.path));
}
Does someone know how this could happen?
Steps to Reproduce:
I think my setup is too complex to reproduce.
What I found out from looking at debugpy logs, is that debugpy is kind of creating translations for file paths:
And when theia finds info about sourceReference in debug-source.ts it tries to build the URL from that: return new URI().withScheme(DEBUG_SCHEME).withPath(raw.name!).withQuery(String(raw.sourceReference));
I have quite complex remote debug behavior of a python script using debugpy and Theia 1.55.1.
Bug Description:
When I launch the debugging an exceptions occurs at:
It turns out that in debug-source.ts at line 83 the raw.name! is undefined:
Does someone know how this could happen?
Steps to Reproduce:
What I found out from looking at debugpy logs, is that debugpy is kind of creating translations for file paths:
And when theia finds info about sourceReference in debug-source.ts it tries to build the URL from that:
return new URI().withScheme(DEBUG_SCHEME).withPath(raw.name!).withQuery(String(raw.sourceReference));
Additional Information
debugpy.pydevd.12791.log
The text was updated successfully, but these errors were encountered: