Let's consider the following example with main.go and main_test.go files:

package main

import (
"log"
)

func main() {
log.Printf(foo())
}

func foo() string {
return "Foo"
}
package main

import (
"testing"
)

func TestFoo(t *testing.T) {
t.Error(foo())
}

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?

0

请先登录再写评论。