Cannot run go tests in "main" package in IntellijIdea Ultimate with go plugin
已回答
According to this post https://stackoverflow.com/questions/31352239/how-to-test-the-main-package-functions-in-golang
There is a possibility to run tests in golang for "main" package, "main" module.
Is there a configuration to make IntellijIdea Goland running tests this way? I suffer lack of possibility to debug my unit tests.
请先登录再写评论。
Let's consider the following example with main.go and main_test.go files:
You can start a debug session by setting a breakpoint in main_test.go and click on the gutter icon around TestFoo() function.
Could you please elaborate a bit? Do you get any errors during debug sessions?