In the method handling evaluate request, there exist a guard to discard requests without frameIDs that come with a context other than repl. I believe it would be a good idea to create a frame handle for global expressions in which undefined frameIDs would fall back to. This would entail the following:
-
Creating a frame handle for global expressions at the beginning of every stackTrace request. StackTrace requests are where frame handles are created. They are later all reset when stopped event and continued event are fired.
-
Remove the guard for undefined frameIDs from evaluate requests and assign undefined frames to the frame handle specified for global expressions. Current behaviour is that undefined frameIDs would get assigned with frame handle -1, which doesn't exist.
In the method handling evaluate request, there exist a guard to discard requests without frameIDs that come with a context other than
repl. I believe it would be a good idea to create a frame handle for global expressions in which undefined frameIDs would fall back to. This would entail the following:Creating a frame handle for global expressions at the beginning of every stackTrace request. StackTrace requests are where frame handles are created. They are later all reset when stopped event and continued event are fired.
Remove the guard for undefined frameIDs from evaluate requests and assign undefined frames to the frame handle specified for global expressions. Current behaviour is that undefined frameIDs would get assigned with frame handle -1, which doesn't exist.