Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit 1e96434

Browse files
authored
Merge pull request #173 from microsoft/ningli/webview2
Update chromeDebugAdapter.ts
2 parents ad91f5b + 7cda976 commit 1e96434

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/chromeDebugAdapter.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,15 @@ export class ChromeDebugAdapter extends CoreDebugAdapter {
9595
const chromeEnv: coreUtils.IStringDictionary<string> = args.env || null;
9696
const chromeWorkingDir: string = args.cwd || null;
9797

98-
if (!args.noDebug) {
98+
if (!args.useWebView && !args.noDebug) {
9999
chromeArgs.push('--remote-debugging-port=' + port);
100100
}
101101

102102
// Also start with extra stuff disabled
103-
chromeArgs.push(...['--no-first-run', '--no-default-browser-check']);
103+
if (!args.useWebView) {
104+
chromeArgs.push(...['--no-first-run', '--no-default-browser-check']);
105+
}
106+
104107
if (args.runtimeArgs) {
105108
telemetryPropertyCollector.addTelemetryProperty('numberOfEdgeCmdLineSwitchesBeingUsed', String(args.runtimeArgs.length));
106109
chromeArgs.push(...args.runtimeArgs);
@@ -117,7 +120,7 @@ export class ChromeDebugAdapter extends CoreDebugAdapter {
117120
args.userDataDir = path.join(os.tmpdir(), `vscode-edge-debug-userdatadir_${port}`);
118121
}
119122

120-
if (args.userDataDir) {
123+
if (!args.useWebView && args.userDataDir) {
121124
chromeArgs.push('--user-data-dir=' + args.userDataDir);
122125
}
123126

@@ -139,7 +142,7 @@ export class ChromeDebugAdapter extends CoreDebugAdapter {
139142
launchUrl = 'about:blank';
140143
}
141144

142-
if (launchUrl) {
145+
if (!args.useWebView && launchUrl) {
143146
chromeArgs.push(launchUrl);
144147
}
145148

0 commit comments

Comments
 (0)