英文:
How to debug a Raku program
问题
我查看了文档,但我不太明白如何调试。我使用raku-debug命令,但它报告了一个错误:
> 无法找到Debugger::UI::CommandLine。
当我尝试在zef上搜索时,我没有找到任何结果。
Raku是否有类似于gdb的调优工具,就像Python或JavaScript调试工具一样?我应该如何调试Raku程序?
英文:
I looked at the documentation, but I didn't quite understand how to debug. I use the raku-debug command, but it reports an error:
> Could not find Debugger::UI::CommandLine.
When I tried to search on zef, I didn't find any results.
Does Raku have a tuning tool similar to gdb, just like Python or JavaScript debugging tools? How am I supposed to debug a Raku program?
答案1
得分: 1
<sub>从评论中迁移解决方案:</sub>
> 文档中有这个页面 (https://docs.raku.org/programs/01-debugging)。它说要运行 raku-debug-m
命令,您必须首先安装 Debugger::UI::CommandLine
,它随 Rakudo Star 捆绑提供。但是,如果访问调试器的存储库 (https://github.com/jnthn/rakudo-debugger),它说明已被 MoarVM Remote Debug 取代,它具有图形用户界面(通过 the Comma IDE)和命令行界面。
>
> – uzluisf Jul 23 at 22:23
> 总之,下载 Comma;它带有调试工具、断点和您调试程序所需的一切。由于它基于 IntelliJ Idea,与 PyCharm 或 WebStorm 类似,因此您会感到很熟悉。
>
> – jjmerelo Jul 24 at 7:53
英文:
<sub>Migrating solution from the comments:</sub>
> There's this page in the docs (https://docs.raku.org/programs/01-debugging). It says that to run the raku-debug-m
command, you must first install Debugger::UI::CommandLine
, which comes bundled with Rakudo Star. However going to the debugger's repo (https://github.com/jnthn/rakudo-debugger), it states it's been superseded by MoarVM Remote Debug which has both a GUI (through the Comma IDE) and a CLI.
>
> – uzluisf Jul 23 at 22:23
> so, long story short: download Comma; it comes with debugging facilities, breakpoints, and all you need to debug a program. Since it's based on IntelliJ Idea, it's similar to PyCharm or WebStorm, so you're in familiar territory
>
> – jjmerelo Jul 24 at 7:53
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论