在调试单个测试时,即当我使用功能时,如何将测试标志(例如-test.v和标志)传递给测试程序?-test.vet=offGo: Debug Test at Cursor工作区设置部分也包含这些go.testFlags设置 - 但似乎它们仅在运行测试时有效(Go: Run Test at Cursor)。我正在使用 Visual Studio Code 1.61.2、vscode-go v0.28.1 和自动安装的 dlv-dap。
1 回答

慕桂英3389331
TA贡献2036条经验 获得超8个赞
问题可能来自src/goTest.ts#_testAtCursor()
if (cmd === 'debug') {
return debugTestAtCursor(editor, testFunctionName, testFunctions, goConfig);
} else if (cmd === 'benchmark' || cmd === 'test') {
return runTestAtCursor(editor, testFunctionName, testFunctions, goConfig, cmd, args);
} else {
throw new Error(`Unsupported command: ${cmd}`);
}
cmd, args调用时没有debugTestAtCursor(),而不是runTestAtCursor()。
这可能意味着当前实现不支持此功能。
- 1 回答
- 0 关注
- 125 浏览
添加回答
举报
0/150
提交
取消