Open Almenon opened 6 years ago
The workaround for this (in the case of AREPL-vscode) is to simply debug it.
I might be able to do this just by injecting something like the below into the users code:
# define global printLocals func
# later on in code
print(lineNumber, locals())
Or if the user only wants to print locals during a specific iteration:
called=0;called += 1; if called==X: print(lineNumber, locals()) # X being the iteration number
How breakpoints work currently is..... super hacky, but not in a good way. I simply slice off any text after the breakpoint. In simple cases this is okay but obviously it does not work with functions, whoch may be defined on line 1 yet called on line 100.