From f27b68cdcc53eade9de91d50020163bf9bd5c38f Mon Sep 17 00:00:00 2001 From: Erich Gamma Date: Sat, 31 Mar 2018 15:52:32 +0200 Subject: [PATCH] improve error message --- extensions/npm/src/npmView.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/extensions/npm/src/npmView.ts b/extensions/npm/src/npmView.ts index 62889d038ac..440a3ce7030 100644 --- a/extensions/npm/src/npmView.ts +++ b/extensions/npm/src/npmView.ts @@ -140,13 +140,8 @@ export class NpmScriptsTreeDataProvider implements TreeDataProvider { } let port = await this.extractPort(scripts, task); - // let debugArgs = null; - // if (!port) { - // port = 9229; - // debugArgs = ['--', '--nolazy', `--inspect-brk=${port}`]; - // } if (!port) { - window.showErrorMessage(`Could not launch for debugging, the script needs to include the node debug options: --inspect-brk=port.`); + window.showErrorMessage(`Could not launch '${task.name}' for debugging, the script needs to include the node debug options: '--nolazy --inspect-brk=port', [learn more](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_launch-configuration-support-for-npm-and-other-tools).`); return; } @@ -162,9 +157,7 @@ export class NpmScriptsTreeDataProvider implements TreeDataProvider { ], port: port }; - // if (debugArgs) { - // config.runtimeArgs.push(...debugArgs); - // } + if (isWorkspaceFolder(task.scope)) { debug.startDebugging(task.scope, config); }