Community
Participate
Working Groups
Build Identifier: It would be very nice to add "instance watches" to the debugger. For example, during debugging session, is should be possible to right-click an object reference in the source and choose "Instance watch" from popup menu (similar to current "Watch"). After that, the state of this particular object would be displayed in Expressions window as long as the application is running and the object is in the memory (ie. not garbage collected), *irrespective of the scope* later on. This would be very useful in code areas where the desired object is not easily accessible (eg. insanely long watch expressions required) or not accessible at all (happens too). As a convenience feature, it would also be nice to have a kind of "Instance watch trigger", which would be placed on a reference variable in a specific source code line. When the program execution reaches the line, the instance watch would be automatically added to the Expressions window. This way it wouldn't be necessary to add the instance watch manually at the beginning of each debugging session. Reproducible: Always
The first half of this request already exists. You can run an evaluation in the debugger (inspect) and persist that result in the expresions view (by pressing Ctrl-Shift-I again). This places the actual expression result - object or value - into the expression view rather than the source expression used to generate the result. The icon for such an expression is also different - a magnifying glass. The object/value remains until the VM terminates. The second half is, of course, an enhancement request.
Thanks for the tip, I missed this feature somehow!
BTW. Is pressing Ctrl-Shift-I twice the only way to achieve this? I think many users may miss it, adding an extra popup menu option would still be useful.
From the variables view you can just use the "Inspect" action - that puts the selected object directly into the expressions view. There is no context menu in the inspect pop-up currently, so this would also be an enhancement request.