Skip to content
This repository was archived by the owner on Dec 6, 2022. It is now read-only.

Commit 7beeec1

Browse files
committed
Merge branch 'core5' - fix microsoft/vscode#49472
2 parents 4c0aa81 + d6a5f20 commit 7beeec1

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/chromeDebugAdapter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ export class ChromeDebugAdapter extends CoreDebugAdapter {
187187
}
188188

189189
public commonArgs(args: ICommonRequestArgs): void {
190-
if (!args.webRoot && args.pathMapping && args.pathMapping['/']) {
191-
// Adapt pathMapping['/'] as the webRoot when not set, since webRoot is explicitly used in many places
192-
args.webRoot = args.pathMapping['/'];
190+
if (args.webRoot && (!args.pathMapping || !args.pathMapping['/'])) {
191+
args.pathMapping = args.pathMapping || {};
192+
args.pathMapping['/'] = args.webRoot;
193193
}
194194

195195
args.sourceMaps = typeof args.sourceMaps === 'undefined' || args.sourceMaps;

src/chromeDebugInterfaces.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import * as Core from 'vscode-chrome-debug-core';
66
import { DebugProtocol } from 'vscode-debugprotocol';
77

88
export interface ICommonRequestArgs extends Core.ICommonRequestArgs {
9+
webRoot?: string;
910
disableNetworkCache?: boolean;
1011
urlFilter?: string;
1112
}

testapp/.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@
1010
"node_modules": true,
1111
"bin": true,
1212
"out": true
13-
}
13+
},
14+
15+
"tslint.enable": false
1416
}

0 commit comments

Comments
 (0)