@@ -44,7 +44,7 @@ async function _testAtCursor(
4444 goCtx : GoExtensionContext ,
4545 goConfig : vscode . WorkspaceConfiguration ,
4646 cmd : TestAtCursorCmd ,
47- args : any
47+ args ?: SubTestAtCursorArgs
4848) {
4949 const editor = vscode . window . activeTextEditor ;
5050 if ( ! editor ) {
@@ -72,7 +72,7 @@ async function _testAtCursor(
7272 await editor . document . save ( ) ;
7373
7474 if ( cmd === 'debug' ) {
75- return debugTestAtCursor ( editor , testFunctionName , testFunctions , suiteToTest , goConfig ) ;
75+ return debugTestAtCursor ( editor , testFunctionName , testFunctions , suiteToTest , goConfig , undefined , args ) ;
7676 } else if ( cmd === 'benchmark' || cmd === 'test' ) {
7777 return runTestAtCursor ( editor , testFunctionName , testFunctions , suiteToTest , goConfig , cmd , args ) ;
7878 } else {
@@ -165,7 +165,7 @@ async function _subTestAtCursor(
165165 const escapedName = escapeSubTestName ( testFunctionName , subTestName ) ;
166166
167167 if ( cmd === 'debug' ) {
168- return debugTestAtCursor ( editor , escapedName , testFunctions , suiteToTest , goConfig ) ;
168+ return debugTestAtCursor ( editor , escapedName , testFunctions , suiteToTest , goConfig , undefined , args ) ;
169169 } else if ( cmd === 'test' ) {
170170 return runTestAtCursor ( editor , escapedName , testFunctions , suiteToTest , goConfig , cmd , args ) ;
171171 } else {
@@ -308,10 +308,11 @@ export async function debugTestAtCursor(
308308 testFunctions : vscode . DocumentSymbol [ ] ,
309309 suiteToFunc : SuiteToTestMap ,
310310 goConfig : vscode . WorkspaceConfiguration ,
311- sessionID ?: string
311+ sessionID ?: string ,
312+ testArgs ?: { isTestSuite ?: boolean } ,
312313) {
313314 const doc = 'document' in editorOrDocument ? editorOrDocument . document : editorOrDocument ;
314- const args = getTestFunctionDebugArgs ( doc , testFunctionName , testFunctions , suiteToFunc ) ;
315+ const args = getTestFunctionDebugArgs ( doc , testFunctionName , testFunctions , suiteToFunc , testArgs ?. isTestSuite ) ;
315316 const tags = getTestTags ( goConfig ) ;
316317 const buildFlags = tags ? [ '-tags' , tags ] : [ ] ;
317318 const flagsFromConfig = getTestFlags ( goConfig ) ;
0 commit comments