Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created June 2, 2017 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Whateverable/f23c1cb3afddef7ac09663d8142244ce to your computer and use it in GitHub Desktop.
Save Whateverable/f23c1cb3afddef7ac09663d8142244ce to your computer and use it in GitHub Desktop.
quotable6
‘perl6-debug’
lizmat: fwiw, perl6-debug-m doesn't even start for me. I get "Illegal option --nqp-lib"
rakudo/nom: ... and perl6-debug-j. That makes them work after
is it expected that perl6-debug-m complains about Debugger::UI::CommandLine not being installed?
is it expected there is no perl6-debug, only a perl6-debug-m ?
only a perl6-debug-m (when just building for moar)
timotimo: also, why is there no perl6-debug ?
have you tried running it through perl6-debug-m yet?
RT #130083 for different behavior between perl6-m and perl6-debug-m
from gen/moar/perl6-debug.nqp:392 (/home/theo/rakudo-star-2017.01/install/share/perl6/runtime/perl6-debug.moarvm:)
from gen/moar/perl6-debug.nqp:390 (/home/theo/rakudo-star-2017.01/install/share/perl6/runtime/perl6-debug.moarvm:statementlist)
from gen/moar/perl6-debug.nqp:413 (/home/theo/rakudo-star-2017.01/install/share/perl6/runtime/perl6-debug.moarvm:blockoid)
IOninja: I'm not sure what you mean. It is not my code that gives this message. It is only if I use perl6-debug-m.
And perl6-debug-m is busted on HEAD: ./perl6-debug-m -e 'say "hi"'
hm, my perl6-debug-m is busted: "Cannot find method 'setlang' on object of type Perl6::HookGrammar"
TheovdH: well, I've built 2017.01 rakudo and its perl6-debug-m is still busted with "Illegal option --nqp-lib" :/ wonder what Rakudo Star does to it that it actually works.
Wow perl6-debug-m is cool!
i'm looking to help our perl6-debugger users put breakpoints into other modules
for that to work these other modules have to go through perl6-debugger's Compiler instance, too
well I also try with perl6-debug-m and it just stop in the '</head>' part of my code but don't know what that means
For the record, I resolved the problem with perl6-debug-m spawning legions of mora processes by apt purging, deleting, rakudobrew nuking etc. all rakudo-related installs and reinstalling them all.
I'm finding the perl6-debug-m CLI a bit difficult to get used to. Did someone write up the philosophy on why it departed so much from perl -d?
I installed perl6 on Ubuntu with panda and then Debugger::UI::CommandLine but I can't debug because there is no "perl6-debug" command -- only a "perl6-debug-m" command which, when I invoke it on a rather simple script, brings the system to its knees by spawning a huge number of moar tasks. Any suggestions?
I posted the question at stackoverflow: http://stackoverflow.com/questions/41370817/perl6-debug-m-spawning-moar-till-system-thrashes
isnt it possible to step into the parse method of grammars with perl6-debug-m? or how do i debug grammars?
ufobat: I remember implementing regex stuff in perl6-debug-m ages ago, though haven't tried using it for ages :)
RabidGravy: sorry: perl6-debug-m?
yup, install Debugger::UI::CommandLine and use perl6-debug-m on your thing
hmm i don't get any errors normally but when i run using perl6-debug I get this https://i.imgur.com/81wU5TC.png
.tell p3rln00b hmm i don't get any errors normally but when i run using perl6-debug I get this https://i.imgur.com/81wU5TC.png not at all the error i was expecting though but that makes more sense why i don't see it print out anything if it was erroring out before
so like 'perl6-debug'
perl6-debug is pretty cool. you can use it to single-step through regex matches and it'll show you what's matching what and such
perl6-debug lets you single-step through regexes, btw. just have to install the ::Commandline module for it
melezhik: have you tried perl6-debug-m yet? (you need to install a front-end module)
perl6-debug-m for what ?
have you tried either perl6-debug-m (after installing the necessary user interface module) or Grammar::Tracer or Grammar::Debugger?
and we don't have something like perl6-debug-m for nqp
timotimo: its a very strange thing to see when running perl6-debug-m. Also I'm used to using @property in python to debug when and where attributes are used.
I was using perl6-debug-m. but I'm guessing its the same thing in gdb if you actually step through the program
no, of course, perl6-debug-m is our perl6 debugger
does perl6-debug currenty work? and Grammar::Debugger?
what am i doing wrong w/ perl6-debug ? https://www.irccloud.com/pastebin/NPVRQaL5/
is trying to get the perl6-debug -D hooks to do something useful
perl6-debug-m -D myTrace.pm htmlify.p6 --no-highlight
timeless: unfortunately I have no idea. I've never attempted to use perl6-debug-m :/
tbh, i'm more interested in how to get perl6-debug-m -D myTrace.pm ... to run
You can invoke tracer like perl6-debug-m -DDevel::Trace example.p6.
perl6-debug-m -DmyTrace htmlify.p6 --no-highlight
I get the following error when I try to start a debug session (perl6-debug-m): "Unhandled exception: ctxlexpad needs an MVMContext". Can someone give me a hint as to what I can do to get this to work?
i tried perl6-debug-m and it slowed things down to a crawl
moar nqp-m perl6-debug-m perl6-m pygmentize rakudobrew.bat zef-j
so, why does perl6-debug-m `s` seem to be `run`? https://www.irccloud.com/pastebin/gNfBTfwp/
i suppose i could make my shell map `perl6 -d` to `perl6-debugger-m` ...
is there a signal i can send to perl6 / perl6-debug-m to get a stack trace?
(this is running perl6-debug-m ... htmlify.p6)
timeless: htmlify is slow. running it through --profile or perl6-debug-m is just going to slow it down MORE. try running it with --sparse (to htmlify) to avoid doing work. also find the other options that don't highlight syntax...
"perl6-debug-m -ll-exception --doc=HTML ./bad-pod-example.pod"
...etc.; i.e., I get the help menu from "perl6-debug-m", so is there a bug in perl6-debug-m or am I doing something stupid?
If I cut exe down to "perl6-debug-m --doc ./bad-pod-example.pod" I get
i have a program that produces two different results depending on whether it's run by perl6 or perl6-debug-m
perl6-debug-m produces Match object, perl6 produces Nil
AlexDaniel: that guy convert swift-debugger to python-debugger and now im going to convert python-debugger into perl6-debugger :)
moar nqp nqp-m perl6 perl6-debug-m perl6-gdb-m perl6-m perl6-valgrind-m
12 Jan 2016 07:47Z <nine> donaldh: I know it-s perl6-debug-m. There's also perl6-debug-j, so I just replace "perl6-debug" in $*EXECUTABLE by "perl6"
.tell donaldh I know it-s perl6-debug-m. There's also perl6-debug-j, so I just replace "perl6-debug" in $*EXECUTABLE by "perl6"
does perl6-debug work for anyone?
When I run perl6-debug-m it spawns many moar processes for precompilation and then hangs
I think the debugger's problem is that it tries to precompile a module using $*EXECUTABLE which is perl6-debug-m which then tries to precompile a modules using $*EXECUTABLE...
rakudo/nom: Fix perl6-debug running into a precompilation endless loop
rakudo/nom: perl6-debug tries to load Debugger::UI::CommandLine which will be precompiled
rakudo/nom: on first use with $*EXECUTABLE which is perl6-debug which tries to load ...
rakudo/nom: Fixed by detecting that we're using the perl6-debug executable and using
it's called perl6-debug-m
Speaking of bugs as a person not Doing The Work, has anyone else commented on the fact that perl6-debug-m keeps respawning moar?
so, I try perl6-debug-m, I get "**SORRY** could not find Debugger::UI::CommandLine". Fine, I install it with panda. And then: ===SORRY!===
thanks Zoffix, I saw a youtube video where he was using a perl6-debugger but I couldn't get it to work
Does the existance of a perl6-debug-m but no perl6-debug indicate that I've built something wrong and/or happen to explain why perl6-debug-m does not stop at my breakpoints? :)
glaukommatos: not having `perl6-debug` is normal, can't speak for the rest
So, I hope someone familiar with the debugger might be able to point out something silly I'm doing. I run my p6 file with perl6-debug-m filename.p6; then I do bp add <linnum> and press enter; then I type r and press enter. I expect the debugger to stop at <linnum>, but instead it just goes straight on through the rest of the file. Is this the expected behavior, or is something weird?
Interesting. It seemed like perl6-debug-m was allowing me to step through the grammar in my p6 file. Am I confusing the grammar debugger with the normal debugger? How do you normally invoke the grammar debugger?
Interesting. I haven't got any such use statements. But when I run with perl6-debug-m file.p6 it still lets me step through the whole process (which is really freaking amazing, btw). I need to read more docs!
but i seem to recall a bit about being able to do the same with the perl6-debug-m mostly. as in perl6-debug-m is powerful enough to go all the way down ...
Yeah, I know that when I step through with perl6-debug-m that it will go into detail during the parsing process if I do my MyGrammar.parse($string).
eh, just what you said....: perl6-debug-m ./someprog.pl6 ... bp add 16␤ r␤
$ perl6-debug-m ChannelReact.pm6 => Could not find Debugger::UI::CommandLine:ver<True>:auth<True>:api<True>
any idea when perl6-debug-m will work again?
and `perl6-debug-m` doesn't work at all, looks like I'll have to do this the good old php way.
timotimo: than perl6-debug-m should not ship with core
ab5tract: but perl6-debug-m can take any frontend, not just the commandline one!
perl6-debug-m is only in the Rakudo repo at all becaues it was getting hard to maintain outside of there because we don't have a good enough API yet
So does perl6-debug-m not work right now? After installing Debugger::UI::CommandLine, I'm now getting "Circular module loading detected involving module 'Debugger::UI::CommandLine'" when I run perl6-debug-m
in fact it's a bit more useful for debugging concurrency issues than perl6-debug has been in my experience
MadcapJake: oh, I was suggesting it in replacement of perl6-debug
AlexDaniel: moar, nqp-m, perl6-debug-m, perl6-m, rakudobrew, nqp, perl6, perl6-gdb-m, perl6-valgrind-m, rakudobrew.bat
I try to run perl6-debug and it says I need this library installed
well, I copied that library and its dependency, but trying to use perl6-debug resulted in this:
any idea how I can debug with perl6-debug-m or something else because I get this: Unhandled exception: ctxlexpad needs an MVMContext
so am I doing this right: PANDA_SUBMIT_TESTREPORTS=1 perl6-debug-m --ll-exception ~/.rakudobrew/bin/panda install IDNA::Punycode
what are some common ways to run perl6 projects? I know of `perl6 foo.p6`, `perl6-debug-m foo.p6`, `perl6-gdb-m foo.p6`, `perl6-valgrind-m foo.p6`, and `prove -e perl6 -r t/` for running tests. Are there other ways that you run/build/test your code? Is there a way to specify an application's entry point? Is a `Build.pm` style workflow only for projects that utilize custom C code?
I mean, (I rebuild a rakudo/moar with rakudobrew in user) when I try to use perl6-debug-m it tell me Could not find Debugger::UI::CommandLine in any of:
I am trying to debug a module with perl6-debug-m but I am getting 'Unhandled exception: ctxlexpad needs an MVMContext': https://gist.github.com/djgoku/4b4d45062ba39043b6dc
Where does @*MODULES come from? It doesn't seem to be declared, except in perl6-debug.nqp
Cannot find method 'from' in any widen_expr_from at gen/moar/m-perl6-debug.nqp:298 in any at gen/moar/m-perl6-debug.nqp:279 in any statement_control:sym<loop> at gen/moar/m-perl6-debug.nqp:278 in any statement_control:sym<loop> at /usr/local/share/nqp/lib/Perl6/Grammar.moarvm:1 in any statement_control at /usr/local/share/nqp/lib/Perl6/Grammar.moarvm:1 in any statement at src/Perl6/Grammar.nqp:1202
n nany statementlist at src/Perl6/Grammar.nqp:1132 in any at gen/moar/m-perl6-debug.nqp:393
i cannot debug it with perl6-debug-m on windows because after installing Debugger::UI::CommandLine, first ENTER works and then gets stuck...
tries to determine what is happening with perl6-debug but to no avail
jnthn: I'm personally of the opinion that rakudo requiring externally-hosted modules for some of its features is a poor idea. I'd like if a Linenoise-ish module, and a basic module for perl6-debug, would be provided like Pod::To::Text
jnthn: well, if the compiler needs it (e.g. the default UI for perl6-debug), that sounds to me like a case of something that should be a part of the compiler :)
FROGGS: I don't use rakudobrew. I install straight from the repos (not even using the --gen options), and I've been a bit pissed about the fact that this doesn't give me a complete compiler, when wanting to use `perl6-debug` or the most basic of REPL line-editing functions.
ShimmerFairy: Well, once we get the slang stuff solidified for 6.d, there'll be a stable API to do what perl6-debug does with the AST and it too can be booted back out to the ecosystem, the way I originally wanted things anyway. :)
maybe perl6-debug-m .. byebye, .sleep()
perl6-debug-m is broken for me after upgrade this weekend -_
perl6-debug-m -e 'if 0 { }'
rakudo/nom: e7b27c4 | leont++ | src/perl6-debug.nqp:
rakudo/nom: bdcccf0 | jnthn++ | src/perl6-debug.nqp:
actually all I did was run perl6-debug-m on my code :)
leont: why don't you install Debugger::UI::Commandline and perl6-debug-m your script? :)
hence: perl6-debug-m :)
Is perl6-debug-m supoosed to work?
What is the state of perl6-debug-m?
I'm getting an unhandled exception with perl6-debug-m on Perl6::TypeGraph (from perl6/doc): https://gist.github.com/Zhtwn/06bda4ea1932075be431
i think you can tell perl6-debug-m with a flag what exact UI module it's supposed to look for
can i somehow tell perl6-debug to step into built-in functions?
smls: perl6-debug depends on compiling the code with a special compiler that puts a bunch of hooks in place so that stepping and stuff work
If so, consider using perl6-debug-m for executing your program.
i'm also wishing for a way to specify "please rebuild modules" for the perl6-debug-m binary, because that'd mean you can debug into those
"Unhandled exception: ctxlexpad needs an MVMContext" trying to run perl6-debug-m (rakudo g72a187e)
strange... whenever I try to use perl6-debug-m (and after I've installed Debugger::UI::CommandLine), I always get "Unhandled exception: ctxlexpad needs an MVMContext" when starting a program
DrForr: Is none of perl6-debug, Grammar::Tracer, or Grammar::Debugger functional (or sufficiently functional)?
using perl6-debug-m (plus installing Debugger::UI::CommandLine) is very nice for playing around with regexen
and when using perl6-debug-m, it spends an a weird number of steps in what seems to be the same place
J-L: re REPL on a script. maybe you want perl6-debug? (See https://perl6advent.wordpress.com/2012/12/05/a-perl-6-debugger/)
you get the Debugger::UI::CommandLine module from the ecosystem and run perl6-debug-m which will use that module to give you a user interface
perl6-debug-m will allow you to see what comes up
yikes t/spec/S02-types/native.rakudo.jvm works when run with perl6-debug-j
damn, i can't run my gen-recents.pl through perl6-debug-m
time perl6 -n -e 'say $0 if m/(<!>)/' perl6-debug-p.c # real 0m4.063s
time perl6 -n -e 'say $0 if m/(<<\w**5>>)/' perl6-debug-p.c # real 0m4.528s
time perl6 -n -e 'say $0 if m/<!>/' perl6-debug-p.c # real 0m2.971s
hrm, I'm getting an unhandled exception error when running htmlify.p6 through perl6-debug-m
jnthn: [ptc] had some fun earlier getting an "an unhandled exception error when running htmlify.p6 through perl6-debug-m". It doesn't happen with regular perl6-m
I'd tried to run perl6-debug-m, however Debugger::UI::CommandLine was missing, hence I rebootstrapped panda...
jnthn: curiously, it fails differently when using perl6-debug-m
ab5tract: perl6-debug-m hasn't got much clue what to do with threads yet :(
has anyone here used perl6-debug?
jnthn: so let me get this straight, all I need to do is run perl6-debug, I don't need https://github.com/jnthn/rakudo-debugger/ ?
adu: perl6-debug is only the driver; you need a frontend installed, the only one of which I know of at the moment is the github module you linked to (though the design is such there could be others).
jnthn: perl6-debug-m is broken for me: https://gist.githubusercontent.com/ab5tract/cbf4867b441ab2ea84d7/raw/eee8ac6c61613f071b7c0eb2da0e7a88b9e03e6e/And%20perl6-debug-m%20breaks.
does perl6-debug-m work for any of them? ;)
im working with proc::async to drive the perl6-debug-m process to step in
is the step out functionality in perl6-debug not implemented or has a bug?
is it a known issue that perl6-debug-m doesnt step out?
step outside a routine seems not to work in perl6-debug-m
i was working on integrating perl6-debug-m with farabi6 to provide a gui
has perl6-debug been deprecated or removed?
oh perl6-debug-m
farabi6 + perl6-debug-m integration in progress https://github.com/azawawi/farabi6/issues/16
while trying to run perl6-debug
perl6-debug seems to get lost in the myriad of regexp and whatnot
Grammar::Debugger and perl6-debug.
this is what perl6-debug is based on, e.g. afaik
should this be changed? rakudo/src/perl6-debug.nqp:443: nqp::findmethod(Perl6::Compiler, 'eval')(self, |@pos, |%named)
perl6-debug to the rescue
debugging with say is just being locked in the past. I don't remember how far perl6-debug goes, but a "real"® debugger that allows you to see code, evaluate expressions at a point of time, and jump from one callframe to another will always be better than just say()s
One of the reasons perl6-debug has tracepoints as well as breakpoints is because some problems are much easier to work out if you've a dump or log and can read through it.
perl6-debug-m: whe one you show me at fosdem
Once, the debugger was completely separate. These days, perl6-debug contains the stuff tied to the compiler that it became an utter pain to maintain on the outside, while the frontend doing the UI stuff lives where it always has.
rakudo/nom: 3756b5b | jnthn++ | src/perl6-debug.nqp:
perl6-debug-m complains of a missing Debugger::UI::CommandLine
ah, perl6-debug-m ?
colomon_: perl6-debug or perl6-debug-m, yeah. And make sure the debugger frontend is installed.
jnthn: I'm not getting perl6-debug at all, just perl6-debug-m. (or whatever, for the other backendss0
I can replicate that with this: perl6-debug-m -e "my constant $mm = 25.4 / 72;"
perl6-debug-m -Ilib t/persistence.t
japhb: well if I run perl6-debug-p -Ilib t/persistence.t I get the same error
perl6-debug-m -Ilib t/persistence.t # Start argument to substr out of range. Is: -1, should be in 0..0
rakudo/nom: Include proper version info into perl6-debug.
raiph@feather:~/work/slangs$ perl6-debug-m -e 'use lib <.>; use Uhh'
that substr error is what perl6-debug currently fails with, which I think has something to do with the version number not being set properly
[bash]mking@egwene$ perl6-debug-p
FROGGS: Now that we actually have perl6-debug in the Rakudo repo, we can include the proper version information in it, rather than the fake stuff (see hll-config in the source) it used when it was in another repo.
perl6-debug appears to be broken, explodes with "Start argument to substr out of range. Is: -1, should be in 0..0"
maybe it'd be best like perl6-debug that you pass a parameter to specify what perl6 module to load as the front-end
jnthn: My perl6-debug-m problems? I haven't backlogged whether that was fixed in the last couple days.
Is perl6-debug-m known broken right now? I get 'Start argument to substr out of range. Is: -1, should be in 0..0' no matter how I use it (as a reply, with a -e '...' script, with a file script)
Oh, now *that's* interesting. This is what `perl6-debug-m -v` prints: This is perl6 version built on MoarVM version 2014.05-2-gb1add28
timotimo: I think that (or a related bug during the process var refactoring) is why perl6-debug-m is failing.
timotimo: Anyway. If you run 'perl6-debug-m' and then when the REPL comes up, do 'say "boo"', you should see the big backtrace
I just think that having a perl6-debug binary that doesn't work is sort of bad :)
btw, if we create a debugger to debug MoarVM, it should be called: perl6-debug-vm for "perl6-debug eVen Moar"
raiph@feather:~/.rakudobrew/moar-HEAD$ ./perl6-debug-m
perl6-debug is spitting out 'Unknown compilation input 'optimize'' anytime I try to use it on anything that's loading .pm6 files o.O
segomos: Did you try perl6-debug also? It provides a much more fine-grained single-stepping.
star: remove perl6-debug, it is included in rakudo now
we could special case it like we did for perl6-debug
I'm hunting a perl6-debug-m SEGV japhb__ found, and then I'll work on cutting a Moar release in time for today's Rakudo release.
.tell jnthn Segfault and oddness in perl6-debug-m; see http://irclog.perlgeek.de/moarvm/2014-03-19#i_8463775
23:25Z <japhb__> jnthn: Segfault and oddness in perl6-debug-m; see http://irclog.perlgeek.de/moarvm/2014-03-19#i_8463775
$ perl6-debug-m ../specs/S26*pod6 --doc=HTML
runs with perl6-debug-m
perl6-debug++ jnthn++
rakudo/nom: Add missing perl6-debug-p to .gitignore
Why is there a perl6-debug-p.exe in my /usr/local? (It's an ELF, just named funny)
jnthn: so you know, I still get a segfault on my pod 5-to-6 script in perl6-debug-m "This is perl6 version built on MoarVM version 2014.01-224-g10580a0". debug-p and debug-j work fine though.
Makefile:726: warning: overriding commands for target `perl6-debug-m'
Makefile:366: warning: ignoring old commands for target `perl6-debug-m'
tools/build/Makefile-JVM.in:J_DEBUG_RUNNER = perl6-debug-m@runner_suffix@
rakudo-debugger: perl6-debug now in Rakudo; remove it from here.
looks like a low-level error, but I can tr.. wait, I don't think perl6-debug-m will work
Yeah, I and someone else (can't remember who) run into issues with perl6-debug-m when IO (like open()) is involved, or so it seems.
I just tried "my $f = open('README'); for $f.lines -> $l { say $l; }" with perl6-debug-m and it worked out ok
jnthn: sorry to take so long getting back about the debug segfault. after getting the latest moar/nqp/rakudo all installed on jvm/moar, perl6-debug-m gives me "missing or wrong version of src/gen/m-BOOTSTRAP.nqp". perl6-debug-j works though
and indeed perl6-debug-m works on that gist I posted for me as well. jnthn++
jnthn: As soon as I'm done updating rakudo, and get a module for perl6-debug-m, I'll be able to look into that bug.
Grr. I get a segfault trying to use perl6-debug-m :(
where's the appropriate place to file a bug against perl6-debug-m? I get a segfault when debugging a program that reads lines from an open file: https://gist.github.com/kanatohodets/1866987aa59b59931873
~/dev/rakudo$ perl6-debug-m
tries to remember if he got perl6-debug-j into the build...
I was trying to use perl6-debug-m but had ===SORRY!=== Could not find Debugger::UI::CommandLine in any of: lib, ...
timotimo: :-( does not work. #!/usr/bin/perl6-debug-m\
use v6\
say "Hello world";\
==> Too many positional parameters passed; got 2 but expected 1
FROGGS: did you use perl6-debug-m ?
rakudo/nom: 40b76ef | (Tobias Leich)++ | src/perl6-debug.nqp:
rakudo/nom: align perl6-debug to latest grammar change
jnthn++ for perl6-debug-m
Uuuh. The bug that I noticed last time with perl6-debug disappeared. And I didn't even restart the comp ._. (I guess that's good news, though)
good news is that my program still can't run with perl6-debug. Need a new test case ...
PerlJam: It'll install (in theory) as perl6-debug-m
timotimo: perl6-debug can't parse my file :(
just running perl6 instead of perl6-debug works though
This snippet works with `perl6` but not `perl6-debug`
err… so once I've installed Rakudo::Debugger, what am I supposed to get? I seem to have executables named perl6-debug.c and perl6-debug.nqp, but no perl6-debug
colomon: you should have perl6-debug
huh. now i get a perl6-debug-m
i wonder why perl6-debug-m doesn't get chmod +x
yeah, but perl6-debug-m comes from rakudo
FROGGS: I did git pull, and rebuilt, and I don't have a perl6-debug executable in my path, I don't think....
… hmmm, perl6-debug-m is there
froggs@TL02L-R8RXTCW-linux:~$ ll /home/froggs/dev/nqp/install/bin/perl6-debug*
-rw-r--r-- 1 froggs froggs 315 Feb 4 21:20 /home/froggs/dev/nqp/install/bin/perl6-debug-m
The debugger stuff is in a transitional state. I started getting the perl6-debug-* being built in the Rakudo build
was hoping for perl6-debug-p
Oh, yeah, I had that bug with perl6-debug (not happening with perl6 itself). what's the best place to report it ?
Oke. Can I reproduce a perl6-debug here ? The bug might've been fixed within the last release of the last msi
no, camelia doesn't do perl6-debug
rakudo/nom: ada4cdd | jonathan++ | src/perl6-debug.nqp:
somehow, the +x on perl6-debug-m wasn't carried over when I did 'make install'
rakudo/nom: Means we'll be able to use it to create a perl6-debug one also.
rakudo/nom: Add perl6-debug into MoarVM build.
isn't sure if he has ever successfully built perl6-debug
yay, fixed the sync thing and have a working perl6-debug on Moar.
lue: https://github.com/jnthn/rakudo-debugger/blob/master/bin/perl6-debug.nqp is the thing I'm wanting to bring into the Rakudo repo. https://github.com/jnthn/rakudo-debugger/blob/master/lib/Debugger/UI/CommandLine.pm is the one to stay where it is.
jnthn: "@ARGS.unshift('-MDebugger::UI::CommandLine');" Is that how perl6-debug uses the CommandLine by default? Would -MDebugger::UI::Qt override it?
yeah. jnthn: if perl6-debug.nqp goes in the rakudo repo, I'm not sure how to not also include CommandLine.pm (or *some* sort of default frontend)
If anybody is looking to take a fairly manageable task off my list: bring the perl6-debug frontend (not the Perl 6 UI module, just the perl6-debug program itself) into the Rakudo repo and get it so we build it on all 3 backends, generating and installing a fakeexecutable on Parrot and a runner on Moar and JVM.
Bonus: you most likely get to be the person to thank for us having perl6-debug on MoarVM :)
ah, so you want the debugger hooks in rakudo, but not the specific CUI program used for 'perl6-debug' ?
lue: Well, perl6-debug is the thing I want brought in.
General question: how would folks feel about moving the NQP component of perl6-debug into the Rakudo repo?
can perl6-debug descend into included PIR? How?
--rxtrace didn't reveal anything, I'll try perl6-debug instead. At least then I don't have to wait for the kernel to do the killing :)
FROGGS, jnthn: then there's a stat failure and "Unable to open filehandle from path 'perl6-debug.pbc': No such file or directory(2)", so it seems to require nqp-p, at least for now?
perl6-debug -e 'given "abcdefg" { when /^ \d / { say "digit seen at start" } }'
you type "panda" or "perl6-debug" into your shell, and press enter
in file 'perl6-debug.pir' line 1
Unable to open filehandle from path 'perl6-debug.pbc': No such file or directory(2)
moritz: rakudo-test passed, modules-test passed and I an use perl6-debug for example
example: perl6-debug ships a batch file, so you can actually type `perl6-debug`
like perl6-debug compiles itself using a Makefile
like, perl6-debug, panda, ...
if I install three versions of perl6-debug, clearly the best one should be in PATH (if that bin dir happens to be in path)
yeah, it's not quite there. It does compile CommandLine.pm to jar but there's no easy mechanism to compile perl6-debug.nqp and no magic shell script wrapper to give a handy perl6-debug
donaldh: I hand-hacked the perl6-debug build while getting it working
Basically, you need to compile perl6-debug.nqp using nqp but run with the same settings as perl6 is
rakudo-debugger: c901e44 | jnthn++ | bin/perl6-debug.nqp:
rakudo-debugger: e014aaf | jnthn++ | bin/perl6-debug.nqp:
The fact perl6-debug hasn't been a nightmare to make work on JVM bodes well for getting it on Moar too, once we have Rakudo over there..
Kinda like the way perl6-debug works
colomon: BTW, for grammar debugging did you consider trying the normal perl6-debug? It does know about grammars...
…. I have not gotten perl6-debug working … ever? But I guess I can try it.
needs to try Grammar::Tracer, ::Debugger, and perl6-debug again, he's forgotten what worked and what didn't.
can panda install perl6-debug?
C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 755 modules/rakudo-debugger/perl6-debug.exe
Cannot chmod 755 modules/rakudo-debugger/perl6-debug.exe:No such file or directory at C:/Perl/lib/ExtUtils/Command.pm line 274.
FROGGS: anyway, I'd prefer a .msi without perl6-debugger to no .msi at all
jnthn: I even made .bat files for perl6-debug, p6doc and panda
perl6-debug is already a .exe, no? :)
then not for perl6-debug :P
jnthn: can you please add a .gitignore with perl6-debug* to rakudo::debugger?
meh, perl6-debug fails to build in star
/home/mlenz/p6/star/install/bin/parrot --dynext /home/mlenz/p6/star/install/lib/parrot/5.5.0/dynext/ -o modules/rakudo-debugger/perl6-debug.pbc modules/rakudo-debugger/perl6-debug.pir
error:imcc:loadlib directive could not find library `perl6_group' in file 'modules/rakudo-debugger/perl6-debug.pir' line 1
make: *** [modules/rakudo-debugger/perl6-debug] Error 1
$ ./perl6-debug
- $(NQP) --vmlibs=perl6_group,perl6_ops --target=pir --output=perl6-debug.pir bin/perl6-debug.nqp
+ $(NQP) --vmlibs=perl6_ops --target=pir --output=perl6-debug.pir bin/perl6-debug.nqp
rakudo-debugger: 12a439a | jnthn++ | bin/perl6-debug.nqp:
rakudo-debugger: d0c7ae6 | jnthn++ | bin/perl6-debug.nqp:
error:imcc:loadlib directive could not find library `perl6_group' in file 'perl6-debug.pir' line 1
"error:imcc:loadlib directive could not find library `perl6_group' in file 'perl6-debug.pir' line 1"
perl6-debug.nqp lines 445 -> 1 -> 489 -> NQPHLL and compiler, p6d.nqp -> line 445, some more nqphll, qregex, grammar, perl6-debug line 403, ...
yeah, I get almost the same for ./perl6-debug --ll-exception -e '1'
I'm not sure perl6-debug has seen much real use yet
(using perl6-debug, wrock!)
Grammar::Tracer and perl6-debug do not like to play together
rakudo-debugger: bd3e80d | jonathan++ | bin/perl6-debug.nqp:
perl6-debug seems to install properly now
jnthn: i'm wondering, would cat-ing a file into perl6-debug and comparing it to "known good" output be an acceptable way to have a test case for Rakudo::Debugger?
cognominal: you should try perl6-debug. it does a great job showing regex-in-progress.
FROGGS: Maybe see how perl6-debug gets installed? It must figure out a path not too differently from how you need to...
perl6-debug installs to a regular locatin
gtodd: If it's debugging you want, there's always perl6-debug :)
gtodd: perl6-debug has a REPL mode.
jnthn: just came across your perl6-debug screencast, sweet. jnthn++ the simple::poll perl6 code isn't per chance available as a git repo or zip or tarball somewhere? follwoing along woudl make experimenting a litl easier, same for the try and catch sessions. seeing the code in front of me and "playing" with it helps me learn. (in fact it's probably the only way I learned most perl-ish things)
what's the most sensible way to figure out what width the console has in perl6? i'd like to give perl6-debug knowledge of when to abbreviate a line
started golfing the code that causes perl6-debug to make the code fail
timotimo: Yeah, perl6-debug really shouldn't change semantics...
http://paste.ee/p/CTTKm - there you go. outputs ok 1 - on perl6, outputs a warning about Any used in numeric context, not ok 1 - on perl6-debug
jnthn: do you feel like given a minimal test case you could debug perl6-debug? WRT the .ast/make thingie?
a parse is "ok" without perl6-debug, but "not ok" with perl6-debug
jnthn: any clue about this? 'make' seems to not work in perl6-debugger
timotimo: perl6-debugger?
.oO(try running the Grammar::Debugger using script through perl6-debug)
continuing my attempt to install the rakudo debugger on ubuntu. to recap, i got some errors from 'make rakudo-test': https://gist.github.com/raiph/5032649. i went ahead and did 'make install'. perl-debug says "bash: ./perl6-debug: No such file or directory" then i did 'make modules-test': https://gist.github.com/raiph/5038001 <--- would someone please help me debug getting the debugger running?
raiph: stupid question, have you tried ./install/bin/perl6-debug ?
raiph: the "proper" way to use Rakudo star is to put the install/bin dir in $PATH, and then call the binaries without qualified paths (e.g. just perl6-debug)
huh. I thought I installed perl6-debug with panda the other day, but I have a install/lib/parrot/4.10.0-devel/languages/perl6/site/bin/perl6-debug.nqp and no perl6-debug
make install done. ./perl6 works but ./perl6-debug says "No such file or directory"
rakudo-debugger: 98e4a93 | jnthn++ | bin/perl6-debug.nqp:
perl6-debug++
i would like to try to use perl6-debug to interactively parse somethign
https://github.com/jnthn/rakudo-debugger/blob/master/bin/perl6-debug.nqp#L445 - talking about those
azawawi was last seen in #perl6 21 days 6 hours ago saying "jnthn previously suggested adding a web API for perl6-debug... once that's there, i will be more than happy to integrate it.".
masak: These days there's little reason to toy around with them in NQP when you can do what perl6-debug does and do them on full-blown Perl 6 :)
panda isn't very happy when it's run with perl6-debug :|
so perl6-debugger is voulnerable to BEGIN shell trick ? :)
jnthn previously suggested adding a web API for perl6-debug... once that's there, i will be more than happy to integrate it.
and i can't run the perl6-debugger because it's saying "Missing or wrong version of dependency 'src/gen/Metamodel.pm'" and i can't install it via panda because github is down :|
yay, I can now perl6-debug my t1 entry and figure out why it started failing! tadzik++ jnthn++ masak++
jnthn: is there a way to do something like "perl6-debug code < inputs" ?
not like I'm typing things into perl6-debug.
if no buddy minds, I'd like to braindump my current understanding of how nqp compiles perl6-debugger.nqp
so, when I invoke nqp --vmlibs=perl6_group,perl6_ops perl6-debug.nqp
nqp compiles perl6-debug.nqp into an AST (or a QAST, in this case)
so when NQP is generating the PIR file for perl6-debug, it tries to load perl6_ops. Is that necessary when compiling to PIR?
right now, nqp can't find perl6_ops, but I'm just compiling perl6-debugger.nqp to PIR, so it shouldn't matter, right?
time-travelling for perl6-debug
and the perl6-debugger isn't working for me atm. :(
it *may* be a version discrepancy between my perl6 binary and the perl6-debug one, though
perl6-debug says "this is perl6 version built on parrot 4.6.0 revision 0", but perl6 is "version 2012.11", so ...
(the perl6-debug version output)
okay, I have perl6-debug now. and my computer hasn't blown up yet.
my rakudo build doesn't include a perl6-debug
rakudo-debugger: dceffa4 | jnthn++ | bin/perl6-debug.nqp:
rakudo-debugger: c6bc494 | jnthn++ | bin/perl6-debug.nqp:
jnthn: 28 Nov 23:22Z <sirrobert> tell jnthn I think the perl6-debug in rakudo-star-2012.11-RC1 steps over method/function calls by default, instead of stepping into them.
phenny: tell jnthn I think the perl6-debug in rakudo-star-2012.11-RC1 steps over method/function calls by default, instead of stepping into them.
perl6-debug -v says: This is perl6 version built on parrot 4.6.0 revision 0
I just compiled the latest perl6-debug and it worked
perl6-debug works well enough with regexes though.
jnthn++ # perl6-debug :)
starts hacking at perl6-debugger... web-based API
perl6-debug bin/farabi6
jnthn: any update on the web-based perl6-debug api?
thinks, 'perl6-debug menu, integrate rakudo/niecza, add a REPL' and we have a winner here :)
jnthn: better than an env var, actually, would be a conf file (~/.perl6-debug, or the like)
I'm getting this with ./perl6-debug -e 'say "test"' :
so, regarding the debugger. Once I use make, there is no "perl6-debug" - there's an nqp script, but nqp bin/perl6-debug.nqp foo.p6 errors out. What am I missing?
why is there no perl6-debug?
rakudo-debugger: e4c27f0 | jnthn++ | bin/perl6-debug.nqp:
rakudo-debugger: cc1d58c | jonathan++ | bin/perl6-debug.nqp:
rakudo-debugger: 2a155b7 | jonathan++ | bin/perl6-debug.nqp:
rakudo-debugger: 1462774 | jonathan++ | bin/perl6-debug.nqp:
how can I insert breakpoints in my code for the perl6-debug to catch (rakudo)
glitchmr@feather ~> perl6-debug
perl6-debug perl6-debug-2012.08 perl6-debug-2012.09
where can I get info on how to use perl6-debug?
sirrobert, jnthn++ did a presentation on perl6-debug. IIRC you can start with 'perl6-debug foo' rather than 'perl6 foo' and use the 'help' command to get a feel for what's available.
wow, when i let the perl6-debugger from latest rakudo-star loose on my (probably pretty horrible) code, it explodes
pmurias: https://github.com/jnthn/rakudo-debugger/blob/master/bin/perl6-debug.nqp#L45
pmurias: or https://github.com/jnthn/rakudo-debugger/blob/master/bin/perl6-debug.nqp#L55 ?
See in https://github.com/jnthn/rakudo-debugger/blob/master/bin/perl6-debug.nqp for example
mst: perl6-debug works too
perl6 perl6-2012.07 perl6-2012.08 perl6-debug perl6-debug-2012.08
perl6-debug is not part of 2012.07?
perl6 perl6-2012.07 perl6-2012.08 perl6-debug perl6-debug-2012.08
Cannot chmod 755 modules/rakudo-debugger/perl6-debug.exe:No such file or directo
make 'nmake perl6-debug-install'
can you do the equivalent of make modules/rakudo-debugger/perl6-debug.exe ?
(I've since added a 'perl6-debug' target, but it's not in the rc3 tarball.)
or you can just do 'make perl6-debug-install'
jnthn: it's not creating modules/rakudo-debugger/perl6-debug.pir ?
follow perl6-debug-install in the Makefile
star: Add a perl6-debug target to the Makefile.
when I run perl6-debug from a dos cmd prompt window, I get the escape sequences instead of colors. Should I set something differently?
star/build3: Add rules for building/installing perl6-debug .
star/build3: Be sure to correctly chmod the perl6-debug executable.
Have you tried my $perl6 = $*EXECUTABLE.subst('perl6-debug', 'perl6').subst('perl6-gdb', 'perl6'); in src/core/CompUnit/PrecompilationRepository.pm?
rakudo/nom: c8bd913 | Altai-man++ | src/perl6-debug.nqp:
rakudo/nom: 43c57f0 | Altai-man++ | src/perl6-debug.nqp:
rakudo/nom: 23229c7 | Altai-man++ | src/perl6-debug.nqp:
rakudo/nom: f7613f7 | jnthn++ | src/perl6-debug.nqp:
you can try perl6-debug-m rather than perl6-m
jnthn: Did you manage to find that perl6-debug-m segfault?
Reliable coredump in perl6-debug-m, doesn't occur on other backends:
$ perl6-debug-m -e 'sub MAIN(*@a) { }' foo
Weirdly, perl6-debug-m doesn't seem to know its own version:
$ perl6-debug-m -v
.tell jnthn Segfault and oddness in perl6-debug-m; see http://irclog.perlgeek.de/moarvm/2014-03-19#i_8463775
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment