Reputation: 11
I've been trying to learn Golang backend development and have been following this Youtube guide
https://www.youtube.com/playlist?list=PLy_6D98if3ULEtXtNSY_2qN21VCKgoQAE
But when learning about writing tests i've found that my vscode doesn't display the 'run tests | debug tests' Codelens. I'm running my vscode from my WSL2 Ubuntu using the 'code .' command.
I was also wondering if the command go test ./db/sqlc/ -run TestCreateAccoun
offers that same functionality as this codelens?
The steps that i've tried already have been to
I was wondering if anyone knew further debug steps - i'm willing to give necessary output.
Upvotes: 1
Views: 444
Reputation: 17
To answer your second question, go test ./db/sqlc/ -run TestCreateAccount
is indeed equivalent to the run test
button in VS Code. The debug test
button starts the debugger.
Regarding your initial question, are the Go > Test Explorer: Enable
and Go > Tasks: Provide Default
checkmarks set? You can find these through Settings > Settings > User Settings > search for "go test enable" as shown in attached image.
Upvotes: 0