Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions vscode/src/commands/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
6 changes: 6 additions & 0 deletions vscode/src/commands/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -144,6 +147,9 @@ export const registerDebugCommands: ICommand[] = [
}, {
command: extCommands.projectTest,
handler: projectTest
}, {
command: extCommands.projectTestDebug,
handler: projectTestDebug
}, {
command: extCommands.packageTest,
handler: packageTest
Expand Down
4 changes: 2 additions & 2 deletions vscode/src/views/TestViewController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ 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));
}
}
}
} else {
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());
}
}
}
Expand Down