在此程序中,如何通过调试器中断执行并打印i的值?package mainimport "fmt"func main() { x := "abc" i := 3 fmt.Println(i) fmt.Println(x)}我无法打印。但是我可以打印x:go build test.gogdb test [...]Reading symbols from /home/ned/test...done.(gdb) br 9(gdb) run(gdb) p iNo symbol "i" in current context.(gdb) p x$1 = "abc"
- 1 回答
- 0 关注
- 225 浏览
添加回答
举报
0/150
提交
取消