在除錯單個測驗時,即當我使用該功能時,如何將測驗標志(例如-test.v和-test.vet=off標志)傳遞給測驗程式Go: Debug Test at Cursor?
go.testFlags作業區設定中的部分也包含這些設定 - 但它們似乎只在運行測驗時有效 ( Go: Run Test at Cursor)。
我使用的是 Visual Studio Code 1.61.2、vscode-go v0.28.1 和自動安裝的 dlv-dap。
uj5u.com熱心網友回復:
問題可能來自 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().
這可能意味著當前實作不支持此功能。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/339728.html
