How to update variables values when stack frame changed Follow
I am developing a plugin for debugging a custom language and I would like to update the variable values when the user selects a different stack frame in the Debugger Tab.
I have a class which extends from XDebugProcess class, and I have been trying to use one of the following methods. The positionReached method updates the suspended context with the new variable information but the problem is that it sets always the variable myIsTopFrame to true, and if I use setCurrentStackFrame method instead, the variables for a frame are not updated because I cannot update the mySuspendContext variable with the new variable information.
I am thinking that maybe XDebugProcess class is expecting that the instance of XSuspendedContext has the whole stack information when it is created because so far I have not found a method/classes related to updating only the variable information for a frame.
Please if someone has done something similar I will appreciate that tell me which is the right approach to solve this issue. Thanks.
getSession().setCurrentStackFrame(executionStack, getSession().getCurrentStackFrame(), false);
Please sign in to leave a comment.
Just if someone has the same issue, I passed the whole stack frames information (with the variables for each frame) to my XExecutionStack instance and it worked fine. Now every time a frame is selected the variable values are shown correctly.