Community
Participate
Working Groups
We can drag and drop a variable into the expressions view and get an watch expression created. The default implementation of the drag and drop feature uses the variable name as the expression to monitor. This does not work well for Java if we are dealing with a complex type. Selecting a field of a class and dropping it to the Expressions View uses the field name as the expressions... which often results in invalid expressions, and hence cannot be evaluated. I think JDT Debug needs to implement IWatchExpressionFactoryAdapter2 for a given element, and goes up the tree path, to properly create a watch expression for the drag and drop scenario.