How to debug a Raku program

233 Views Asked by At

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

There are 1 best solutions below

0
TylerH On

Migrating solution from the comments:

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