diff --git a/vscode/src/commands/commands.ts b/vscode/src/commands/commands.ts index f308b0d..cbc8f56 100644 --- a/vscode/src/commands/commands.ts +++ b/vscode/src/commands/commands.ts @@ -39,6 +39,7 @@ export const extCommands = { projectRun: appendPrefixToCommand('project.run'), projectDebug: appendPrefixToCommand('project.debug'), projectTest: appendPrefixToCommand('project.test'), + projectTestDebug: appendPrefixToCommand('project.test.debug'), packageTest: appendPrefixToCommand('package.test'), openStackTrace: appendPrefixToCommand('open.stacktrace'), workspaceSymbols: appendPrefixToCommand('workspace.symbols'), diff --git a/vscode/src/commands/debug.ts b/vscode/src/commands/debug.ts index 48c0459..dbed23c 100644 --- a/vscode/src/commands/debug.ts +++ b/vscode/src/commands/debug.ts @@ -41,6 +41,9 @@ const projectDebug = async (node: any, launchConfiguration? : string) => { const projectTest = async (node: any, launchConfiguration? : string) => { return runDebug(true, true, getContextUri(node)?.toString() || '', undefined, launchConfiguration, true); } +const projectTestDebug = async (node: any, launchConfiguration? : string) => { + return runDebug(false, true, getContextUri(node)?.toString() || '', undefined, launchConfiguration, true); +} const packageTest = async (uri: any, launchConfiguration? : string) => { await runDebug(true, true, uri, undefined, launchConfiguration); } @@ -144,6 +147,9 @@ export const registerDebugCommands: ICommand[] = [ }, { command: extCommands.projectTest, handler: projectTest + }, { + command: extCommands.projectTestDebug, + handler: projectTestDebug }, { command: extCommands.packageTest, handler: packageTest diff --git a/vscode/src/views/TestViewController.ts b/vscode/src/views/TestViewController.ts index dad6808..d18e8e9 100644 --- a/vscode/src/views/TestViewController.ts +++ b/vscode/src/views/TestViewController.ts @@ -69,7 +69,7 @@ export class NbTestAdapter { this.set(item, 'enqueued'); const idx = item.id.indexOf(':'); if (!cancellation.isCancellationRequested) { - await commands.executeCommand(request.profile?.kind === TestRunProfileKind.Debug ? extCommands.debugSingle : extCommands.runSingle, item.uri.toString(), idx < 0 ? undefined : item.id.slice(idx + 1)); + await commands.executeCommand(request.profile?.kind === TestRunProfileKind.Debug ? extCommands.debugTest : extCommands.runTest, item.uri.toString(), idx < 0 ? undefined : item.id.slice(idx + 1)); } } } @@ -77,7 +77,7 @@ export class NbTestAdapter { this.testController.items.forEach(item => this.set(item, 'enqueued')); for (let workspaceFolder of workspace.workspaceFolders || []) { if (!cancellation.isCancellationRequested) { - await commands.executeCommand(request.profile?.kind === TestRunProfileKind.Debug ? extCommands.debugTest : extCommands.runTest, workspaceFolder.uri.toString()); + await commands.executeCommand(request.profile?.kind === TestRunProfileKind.Debug ? extCommands.projectTestDebug : extCommands.projectTest, workspaceFolder.uri.toString()); } } }