用Go语言编写的Go调试器:Delve
jopen
11年前
Delve是 个用Go语言编写的Go调试器。
其特性有:
①连接到已经运行的进程
②启动一个进程时就开始调试会话
③设置断点、单步和步进功能,打印变量的内容,打印线程和goroutine的信息。
命令
一旦调试会话内,就可以使用下面的命令:
-
break- Set break point at the entry point of a function, or at a specific file/line. Example:break foo.go:13. -
continue- 运行到断点或程序终止。 -
step- 通过单步执行程序。 -
next- 跳过下一源行。 -
threads- 所有跟踪线程的打印状态。 -
goroutines- 所有Go例程的打印状态 -
print $var- Evaluate a variable. -
exit- 退出调试器Exit the debugger.