From 812d082e9032647dcbbd9e44bda4e576e96d27d6 Mon Sep 17 00:00:00 2001 From: Erich Gamma Date: Sat, 28 Jul 2018 18:40:21 +0200 Subject: [PATCH] Fixing Cannot debug npm script using Yarn #55103 --- extensions/npm/src/tasks.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/npm/src/tasks.ts b/extensions/npm/src/tasks.ts index 008d5ba7e70..3060cce1ed6 100644 --- a/extensions/npm/src/tasks.ts +++ b/extensions/npm/src/tasks.ts @@ -289,8 +289,8 @@ async function readFile(file: string): Promise { } export function extractDebugArgFromScript(scriptValue: string): [string, number] | undefined { - // matches --debug, --debug=1234, --debug-brk, debug-brk=1234, --inspect, - // --inspect=1234, --inspect-brk, --inspect-brk=1234, + // matches --debug, --debug=1234, --debug-brk, debug-brk=1234, --inspect, + // --inspect=1234, --inspect-brk, --inspect-brk=1234, // --inspect=localhost:1245, --inspect=127.0.0.1:1234, --inspect=[aa:1:0:0:0]:1234, --inspect=:1234 let match = scriptValue.match(/--(inspect|debug)(-brk)?(=((\[[0-9a-fA-F:]*\]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9\.]*):)?(\d+))?/); @@ -321,7 +321,7 @@ export function startDebugging(scriptName: string, protocol: string, port: numbe name: `Debug ${scriptName}`, runtimeExecutable: packageManager, runtimeArgs: [ - 'run-script', + 'run', scriptName, ], port: port, -- GitLab