提交 3e60335d 编写于 作者: I isidor

debug source: give priority to sourceReference than to paht when determining if internal

fixes #16913
上级 8b122cdf
......@@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
import uri from 'vs/base/common/uri';
import * as paths from 'vs/base/common/paths';
import { DEBUG_SCHEME } from 'vs/workbench/parts/debug/common/debug';
export class Source {
......@@ -15,7 +14,8 @@ export class Source {
private static INTERNAL_URI_PREFIX = `${DEBUG_SCHEME}://internal/`;
constructor(public raw: DebugProtocol.Source, available = true) {
this.uri = raw.path ? uri.file(paths.normalize(raw.path)) : uri.parse(Source.INTERNAL_URI_PREFIX + raw.sourceReference + '/' + raw.name);
const path = raw.path || raw.name;
this.uri = raw.sourceReference > 0 ? uri.parse(Source.INTERNAL_URI_PREFIX + raw.sourceReference + '/' + path) : uri.file(path);
this.available = available;
}
......
......@@ -555,7 +555,7 @@ export class CallStackRenderer implements IRenderer {
private renderStackFrame(stackFrame: debug.IStackFrame, data: IStackFrameTemplateData): void {
stackFrame.source.available ? dom.removeClass(data.stackFrame, 'disabled') : dom.addClass(data.stackFrame, 'disabled');
data.file.title = stackFrame.source.uri.fsPath;
data.file.title = stackFrame.source.raw.path || stackFrame.source.name;
data.label.textContent = stackFrame.name;
data.label.title = stackFrame.name;
data.fileName.textContent = getSourceName(stackFrame.source, this.contextService);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册