So i've been using Rascal for a while now, but I was wondering if there is support debugging without using println and the terminal?
So like with c# in Visual Studio, stepping through the code, into functions and so on.
For me this would be a big help and can save time.
To view debug information on the monitor terminal, perform the following tasks: Execute the terminal monitor and terminal debugging commands. Enable the information center (enabled by default). Use a debugging command to enable the related debugging.
To bring up the Run and Debug view, select the Run and Debug icon in the Activity Bar on the side of VS Code. You can also use the keyboard shortcut Ctrl+Shift+D. The Run and Debug view displays all information related to running and debugging and has a top bar with debugging commands and configuration settings.
Advertisements. Debugging allows the developers to see how the code works in a step-by-step manner, how the values of the variables change, how the objects are created and destroyed, etc.
Just like visual studio, we have breakpoints and stepping through code. Since Rascal runs in eclipse, it might look slightly differently.
Remember to start your rascal console in debug mode, else it won't work.
You start it in debugging mode:
.rsc
file and right clicking Debug as > Rascal application
.start console
from a navigator or editor context-menu, it is a "Debug" console by default.Adding breakpoints is done by clicking in the margin of an editor. Any function you call from the console will activate the debug mode of Eclipse as soon as it hits the breakpoint.
Structured statements such as if and for act a little different in the debugger than what you might expect from Java or C#. Namely you have to "step into" them, otherwise if you press "step over" you will jump over their bodies.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With