From d6a5f20ce65cbefbdbc6c400de9b3f088ebe78bc Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 1 May 2018 16:36:45 -0700 Subject: [PATCH] #643 - Use pathMapping changes from -core --- package.json | 4 ++-- src/chromeDebugAdapter.ts | 6 +++--- src/chromeDebugInterfaces.d.ts | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 2d0d691f..3eee05b8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "debugger-for-chrome", "displayName": "Debugger for Chrome", - "version": "4.3.0", + "version": "4.3.1-beta.0", "icon": "images/icon.png", "description": "%extension.description%", "author": { @@ -24,7 +24,7 @@ ], "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { - "vscode-chrome-debug-core": "^4.1.4", + "vscode-chrome-debug-core": "^5.0.0-pre.0", "vscode-debugadapter": "^1.28.0-pre.2", "vscode-nls": "^3.2.1" }, diff --git a/src/chromeDebugAdapter.ts b/src/chromeDebugAdapter.ts index 61a6fb47..12cc7d5d 100644 --- a/src/chromeDebugAdapter.ts +++ b/src/chromeDebugAdapter.ts @@ -187,9 +187,9 @@ export class ChromeDebugAdapter extends CoreDebugAdapter { } public commonArgs(args: ICommonRequestArgs): void { - if (!args.webRoot && args.pathMapping && args.pathMapping['/']) { - // Adapt pathMapping['/'] as the webRoot when not set, since webRoot is explicitly used in many places - args.webRoot = args.pathMapping['/']; + if (args.webRoot && (!args.pathMapping || !args.pathMapping['/'])) { + args.pathMapping = args.pathMapping || {}; + args.pathMapping['/'] = args.webRoot; } args.sourceMaps = typeof args.sourceMaps === 'undefined' || args.sourceMaps; diff --git a/src/chromeDebugInterfaces.d.ts b/src/chromeDebugInterfaces.d.ts index d98e0fd5..3ed17a90 100644 --- a/src/chromeDebugInterfaces.d.ts +++ b/src/chromeDebugInterfaces.d.ts @@ -6,6 +6,7 @@ import * as Core from 'vscode-chrome-debug-core'; import { DebugProtocol } from 'vscode-debugprotocol'; export interface ICommonRequestArgs extends Core.ICommonRequestArgs { + webRoot?: string; disableNetworkCache?: boolean; urlFilter?: string; }