rascal
rascal copied to clipboard
Rascal debugger cannot handle common keyword parameters
When a Rascal program uses common keyword parameters in a data definition, the debugger will always stop on the line containing the common parameters when code is executed where an actual parameter is used (which does not have to be a common parameter).
When this occurs the stack shown in VSCode is messed up, containing only a kwp initializer frame.
To reproduce, run the following code in the debugger:
module bug::CommonKeyword
data Person(str name="");
data Person = person(int age=42);
void trigger() {
p = person();
_ = p.age;
}
The debugger will break on the data Person(str name=""); line and the stack will be messed up.