use App::MoarVM::Debug:ver<0.2>:auth<zef:raku-community-modules>;

if @*ARGS -> @ARGS {
    my $port := %*ENV<MVM_DEBUG_PORT> // 27434;
    note "Running with debugging enabled at localhost port $port";
    my $proc := run
      $*EXECUTABLE.absolute,
      "--debug-port=$port",
      "--debug-suspend",
      |@ARGS
    ;
    exit $proc.exitcode;
}

# vim: expandtab shiftwidth=4
