Strategy debugger
I would be helpful to have Spoofax be able to drop to a debugger when the “with clause failed unexpectedly”.
Submitted by Dobes Vandermeer on 19 November 2012 at 18:26
Issue Log
There is a debugger: http://strategoxt.org/Spoofax/DebugStratego. It works by instrumenting your Stratego code with debug information, so you have to generate instrumented code every time you wish to debug. I don’t think it supports dropping to a debugger when there is a with failure.
However, the debugger does not work.
In r25724, compilation fails on:
[javac] 1. ERROR in /home/ecastro/workspace.trunk2/Type/editor/java/trans/index_parallel_analyze_1_0.java (at line 55)
[javac] term = parallel_unordered_1_0.instance.invoke(context, term, lifted5990);I tried removing the index-parallel call, and following the procedure in the URL above, without success.
Ah sorry, I didn’t notice that page! I seem to get a bit lost in the docs sometimes, bear with me.
For catching a “with” failure I might be able to put a breakpoint into a special failure rule of my own.
index-parallel is used in a generated library which gets regenerated at build, so that might be why removing that doesn’t work. parallel-unordered is from the stratego-parallel library, maybe that needs to be included somehow? Haven’t used the debugger myself yet so not sure how that works.
For Spoofax projects this is done by changing the build.stratego.args property in build.main.xml to link to stratego-parallel like so:
<property name="build.stratego.args" value=" --library -I "${trans}" -I "${basedir}" -la stratego-lib -la stratego-parallel -la stratego-sglr -la stratego-gpp -la stratego-xtc -la stratego-aterm"/>
That’s what we (should) have the Stratego debugger for; see https://yellowgrass.org/issue/Stratego/2
Log in to post comments