From 07020854c7b7d67bf319300c879da52efca8b16d Mon Sep 17 00:00:00 2001 From: roblou Date: Mon, 2 Jan 2017 21:14:13 -0800 Subject: [PATCH] Implement 'run mode' - fix #220 --- src/chromeDebugAdapter.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/chromeDebugAdapter.ts b/src/chromeDebugAdapter.ts index 51248bf9..b5e116af 100644 --- a/src/chromeDebugAdapter.ts +++ b/src/chromeDebugAdapter.ts @@ -40,7 +40,11 @@ export class ChromeDebugAdapter extends CoreDebugAdapter { // Start with remote debugging enabled const port = args.port || 9222; - const chromeArgs: string[] = ['--remote-debugging-port=' + port]; + const chromeArgs: string[] = []; + + if (!args.noDebug) { + chromeArgs.push('--remote-debugging-port=' + port); + } // Also start with extra stuff disabled chromeArgs.push(...['--no-first-run', '--no-default-browser-check']); @@ -75,7 +79,8 @@ export class ChromeDebugAdapter extends CoreDebugAdapter { this.terminateSession(errMsg); }); - return this.doAttach(port, launchUrl, args.address); + return args.noDebug ? undefined : + this.doAttach(port, launchUrl, args.address); }); }