What is context
What is Context(available in variable tab of Debug viewer). I found that when I was debugging in a function the context is set to that function and only variables defined inside that function are available in variables list. i could not able to access variables outside (In that action only) that function.
Please help me in understanding this basic feature.
Re: What is context
I wrote the referenced thread and I am not sure that it provides an answer to your question--at least as I understand your question.
I too have puzzled over the selectable Context drop down list when working with the Debug Viewer. Online help says:
[ QUOTE ]
In the Context box, you can choose between the main script of the action (VBScript: global code) and the subroutines and functions of the action.
[/ QUOTE ]
So it would appear, and this does tie into my referenced thread, that this has some control over the list variables if all of your code and functions are contained in a test script Action.
But when you hit a breakpoint or step into a function that is contained in a library included via the Test Settings Resource tab the only selection available in the Context dropdown list is the name of the current lib function you are in. I am going to guess this behavior exists due to the fact that before version 9 you could not use the Debugger at all within library functions (and you still can't when a library in included using the ExecuteFile statement).
But here are you workarounds:
1. Any variable that is in scope whenever you hit a breakpoint can always be viewed by (a) placing the variable in the Debug Viewer's Watch Tab's list; and/or issuing either a Print varname or MsgBox varname statement at the Command Tab's prompt.
2. I have, when debugging a function again and again for some complex problem, placed a temporary foo=varname statement in my function.
I sure hope this was the question you are trying to resolve!