亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

調試單個測試時如何提供測試標志?

調試單個測試時如何提供測試標志?

Go
小怪獸愛吃肉 2022-10-10 16:47:23
在調試單個測試時,即當我使用功能時,如何將測試標志(例如-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()。

這可能意味著當前實現不支持此功能。


查看完整回答
反對 回復 2022-10-10
  • 1 回答
  • 0 關注
  • 119 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號