在調試單個測試時,即當我使用功能時,如何將測試標志(例如-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 關注
- 119 瀏覽
添加回答
舉報
0/150
提交
取消