Debugging VM.Script with a custom filename results in being unable to step through code
I have several VM scripts that need to be able to make calls to each other. If I don't provide a filename, the default "evalmachine.<anonymous>" is used and I'm able to step through my code fine. However when one VM calls a function inside another, the debugger points to the wrong file.
I fixed this by passing in a filename into VM.Script, and while my "debugger" statement still works, I'm faced with a new problem. When I try to step through the code, the debugger immediately steps out of the VM (although the script still executes normally).
I've spent 2 days trying out different VM's and messing about with filenames and just can't get to function properly. I'd greatly appreciate some support on this topic. Thanks.
Please sign in to leave a comment.
Please could you share a sample code/files the issue can be repeated with?
Sure. In this example, I'm unable to step beyond the "debugger" statement in testA, whereas stepping works fine when no filename is provided.
Thanks, reproduced. Submitted to developers as https://youtrack.jetbrains.com/issue/WEB-50837
As a workaround, I can suggest disabling Do not step into library scripts in Settings | Build, Execution, Deployment | Debugger | Stepping
Brilliant, that worked perfectly. Thanks!