Microsoft KB Archive/165548

= BUG: Interface Fields are not Displayed when Expanding Object =

Article ID: 165548

Article Last Modified on 5/12/2007

-

APPLIES TO


 * Microsoft Visual J++ 1.0 Standard Edition
 * Microsoft Visual J++ 1.1 Standard Edition

-



This article was previously published under Q165548



SYMPTOMS
When debugging, if you expand an object that implements or inherits an interface, you do not see the fields of that interface anywhere in the object's expansion in the Locals or Watch windows.



RESOLUTION
To work around this problem you need to instantiate an object that implements or inherits, one and then you must cast it to the interface you want to see.



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.



Steps to Reproduce Behavior
  Create and debug a Java project that contains the following two files: //[I1.java] interface I1  { public static final int i = 7; }

//[C1.java] public class C1 implements I1  { public static void main(String args[]) {        C1 c1 = new C1; int i = 0; i = c1.i;     } }                        Step past the line "i = c1.i. Expand c1 in Locals window, or enter and expand it in the Watch window.

Field "i" is not displayed in the expansion, even though it is really part of that object in terms of the data that it puts into local scope.

