我可以在 Groovy 代码中插入调试器语句吗?

发布于 2024-07-25 20:21:15 字数 132 浏览 0 评论 0原文

Ruby 和 Python 都能够从代码中调用调试器(使用 ruby-debug gem 或 pdb 模块)。 我想知道 Groovy 是否可以使用类似的功能。

我对使用 IDE 进行调试不感兴趣。

Both Ruby and Python have the ability of calling the debugger from code ( using the ruby-debug gem or the pdb module ). I'd like to know if something like that's available for Groovy.

I'm not interested in debugging with the IDE.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

另类 2024-08-01 20:21:15

AFAIK Groovy 不支持这一点。 如果您想调试,您的选项是:

  1. 通过将调试参数传递给 JVM 来启动 groovy 进程。 进程启动后,使用命令行 Java 远程调试器
  2. 使用 IDE(IMO,IntelliJ 对调试 Groovy 有最好的支持)

AFAIK Groovy does not support this. If you want to debug your options are:

  1. Start the groovy process by passing the debug arguments to the JVM. Once the process has started, use a command-line Java remote debugger
  2. Use an IDE (IMO, IntelliJ has the best support for debugging Groovy)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文