Like visual studio, we have breakpoints and code jumps. Since Rascal works in an eclipse, it may look a little different.
Do not forget to run the console routine in debug mode, otherwise it will not work.
You run it in debug mode:
- by selecting the
.rsc file and right-clicking Debug as > Rascal application . - or, if you select
start console in the context menu of a navigator or editor, the default is the Debug console.
Adding control points is done by clicking on the edge of the editor. Any function that you invoke from the console activates Eclipse debug mode as soon as it hits the breakpoint.
Structured statements like if and for are slightly different in the debugger than what you would expect from Java or C #. Namely, you need to "enter" into them, otherwise, if you click "step over", you will jump over their bodies.
source share