Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

BDebugger: visually indicate when there are unapplied changes to the environment pane while debugging

Jun
149
13
In the Environment Pane, If a variable is added or changed after starting a Debug session
  • Continuing to execute the code (e.g. Step Into, or run to Breakpoint) will not see the new/changed variable, but it will still be displayed in the window
  • I think it's kind of non-intuitive if I make a change to the environment, (but don't "Apply" the changes) that the changes are shown but are not actually what is in the environment.
Ideally it would be good if changes could be shown in a different color until they are "Applied". Or perhaps some sort of highlight border could be added to the "Apply/Reset" button to indicate that there are unapplied changes.

Short of that being possible, it might be good to explain or emphasize in the help that you can change the environment in an active Debug session but that you must apply the changes for them to take effect. (The help has numerous examples of where "Gotchas" are documented to help users not shoot themselves in the foot.)

Also, this works differently in the Batch Parameters pane where adding or updating a parameter while a script is executing is seen by the debugger without having to Apply the change. This behavior (if it's intended) should also be added to the documentation. And if the Reset/Apply button is not needed for the Batch Parameters pane, should that button even appear there?
 
Why don't you use the Modified pane?

I hadn't considered SETLOCAL/ENDLOCAL.

The Modified pane is probably a more reliable way to know the value of a variable. And there's always the Watch pane, which is probably an even better place to monitor values.

If I Reset/Apply from the Environment pane, everything in the environment shows up in the Modified pane, not just the value I modified. So it's a little busy.

But this is a pretty rare edge case where I'd be changing environment variables on the fly. Now that I understand how Reset/Apply works I can work with it.

Thanks.
 
Back
Top