提交 0950cb9f 编写于 作者: R Rob Lourens 提交者: GitHub

Merge pull request #23949 from Microsoft/roblou/openLoadedScriptUrl

Fix #23194
......@@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
import uri from 'vs/base/common/uri';
import * as paths from 'vs/base/common/paths';
import { localize } from 'vs/nls';
import { TPromise } from 'vs/base/common/winjs.base';
import { guessMimeTypes, MIME_TEXT } from 'vs/base/common/mime';
......@@ -37,7 +36,13 @@ export class DebugContentProvider implements IWorkbenchContribution, ITextModelC
return TPromise.wrapError(localize('unable', "Unable to resolve the resource without a debug session"));
}
const source = process.sources.get(resource.toString());
const rawSource = source ? source.raw : { path: paths.normalize(resource.fsPath, true) };
let rawSource: DebugProtocol.Source;
if (source) {
rawSource = source.raw;
} else {
// Remove debug: scheme
rawSource = { path: resource.with({ scheme: '' }).toString(true) };
}
return process.session.source({ sourceReference: source ? source.reference : undefined, source: rawSource }).then(response => {
const mime = response.body.mimeType || guessMimeTypes(resource.toString())[0];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册