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

Commit d6a5f20

Browse files
committed
#643 - Use pathMapping changes from -core
1 parent da32da7 commit d6a5f20

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "debugger-for-chrome",
33
"displayName": "Debugger for Chrome",
4-
"version": "4.3.0",
4+
"version": "4.3.1-beta.0",
55
"icon": "images/icon.png",
66
"description": "%extension.description%",
77
"author": {
@@ -24,7 +24,7 @@
2424
],
2525
"license": "SEE LICENSE IN LICENSE.txt",
2626
"dependencies": {
27-
"vscode-chrome-debug-core": "^4.1.4",
27+
"vscode-chrome-debug-core": "^5.0.0-pre.0",
2828
"vscode-debugadapter": "^1.28.0-pre.2",
2929
"vscode-nls": "^3.2.1"
3030
},

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
}

0 commit comments

Comments
 (0)