Compare commits

...

1 Commits

Author SHA1 Message Date
Jarred Sumner
1fb34e57be [VSCode] Show more sources in debugger 2024-11-06 03:35:47 -08:00

View File

@@ -1376,10 +1376,10 @@ export class DebugAdapter extends EventEmitter<DebugAdapterEventMap> implements
}
async ["Debugger.scriptParsed"](event: JSC.Debugger.ScriptParsedEvent): Promise<void> {
const { url, scriptId, sourceMapURL } = event;
let { url, scriptId, sourceMapURL } = event;
// If no url is present, the script is from a `evaluate` request.
if (!url) {
if (!url && !sourceMapURL) {
return;
}
@@ -1387,9 +1387,9 @@ export class DebugAdapter extends EventEmitter<DebugAdapterEventMap> implements
// 1. If it has a `path`, the client retrieves the source from the file system.
// 2. If it has a `sourceReference`, the client sends a `source` request.
// Moreover, the code is usually shown in a read-only editor.
const isUserCode = path.isAbsolute(url);
const isUserCode = url && path.isAbsolute(url);
const sourceMap = SourceMap(sourceMapURL);
const name = sourceName(url);
const name = url ? sourceName(url) : sourceName(sourceMapURL);
const presentationHint = sourcePresentationHint(url);
if (isUserCode) {