diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bcbda316..ceeb07e56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ Bug-fixes within the same version aren't needed ## Master +* Fixes debugging of tasks on Windows (bug introduced in 2.6.2) - stephtr + ### 2.6.3 * Even better detection logic for projects created by `create-react-app` - stephtr diff --git a/src/JestExt.ts b/src/JestExt.ts index a9e600ffe..5a5e0278d 100644 --- a/src/JestExt.ts +++ b/src/JestExt.ts @@ -501,7 +501,7 @@ export class JestExt { case '#!/bin/sh': { const line = lines[8] - const match = /^\s*"[^"]+"\s+"$basedir\/([^"]+)"/.exec(line) + const match = /^\s*"[^"]+"\s+"\$basedir\/([^"]+)"/.exec(line) if (match) { return path.join(path.dirname(jest), match[1]) } @@ -512,6 +512,12 @@ export class JestExt { break } + + case 'npm test --': + case 'npm.cmd test --': { + vscode.window.showErrorMessage('Debugging of tasks is currently only available when directly running jest!') + return undefined + } } vscode.window.showErrorMessage('Cannot find jest.js file!')