improve error message

This commit is contained in:
Erich Gamma 2018-03-31 15:52:32 +02:00
parent 2599d9526b
commit f27b68cdcc

View file

@ -140,13 +140,8 @@ export class NpmScriptsTreeDataProvider implements TreeDataProvider<TreeItem> {
}
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<TreeItem> {
],
port: port
};
// if (debugArgs) {
// config.runtimeArgs.push(...debugArgs);
// }
if (isWorkspaceFolder(task.scope)) {
debug.startDebugging(task.scope, config);
}