如何在Delve中删除断点

huangapple go评论80阅读模式
英文:

How to remove a breakpoint in delve

问题

我刚刚安装了delve来调试Go代码。我尝试添加了一些断点,但是我找不到如何删除断点的方法。你如何删除已设置的断点?

英文:

I've just installed delve to debug go code. I tried to add a few breakpoints but I couldn't find how to delete breakpoints. How do you remove a breakpoint you've set?

答案1

得分: 3

查找现有的断点:

breakpoints

它应该输出类似于以下内容:

Breakpoint 1 at 0x4ad817 for main.getChange() ./main.go:22 (1)

现在我们可以删除 断点 1

clear 1

如果你正在进行调试过程中,你可能需要先使用 r 或 restart 命令重新启动,然后再执行 clear 命令。

你也可以使用 clearall 来删除多个断点。

英文:

find existing endpoints:

breakpoints

It should output something like this:

Breakpoint 1 at 0x4ad817 for main.getChange() ./main.go:22 (1)

Now we can delete the breakpoint 1

clear 1

If you are in the middle of a debugging process you may need to restart first with the r or restart command and then execute the clear command.

You can also use clearall to delete multiple breakpoints.

答案2

得分: 0

我发现了如何在delve中移除断点。

你可以使用clear NUMBER或clearall命令。

示例:

清除断点2。

clear 2

清除所有断点。

clearall

此外,在delve中你可以输入help来获取命令列表。

英文:

I found out how to remove a breakpoint in delve.

You can use the clear NUMBER or clearall

Examples:

Clear the break point 2.

clear 2

Clear all the break point.

clearall

In addition, in delve you can actually enter help to get a list of commands.

huangapple
  • 本文由 发表于 2015年5月12日 09:10:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/30180101.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定