admin管理员组文章数量:1123093
Is it possible to run a single Go test in VS Code with a launch.json configuration?
Here's my OS and Go version
Windows 11
Delve Debugger Version: 1.24.0
go version go1.23.4 windows/amd64
Right now, the closest thing I have is running all tests in a file with this configuration:
// Attempt at running a single Go test
{
"name": "Go run single test",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${file}",
"args": [
"^TestDoThing"
],
}
I saw someone add the test name to the args in this question, but it didn't affect my results. All the tests in the file still run. Running a single test with a launch.json configuration is more of a convivence than a requirement for me. But I couldn't find any other questions about it or documentation/articles, so I thought it was worth asking about.
本文标签: visual studio codeRun Single Go Test With launchjson ConfigurationStack Overflow
版权声明:本文标题:visual studio code - Run Single Go Test With launch.json Configuration - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736548340a1944479.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论