BUG: Interface Fields are not Displayed when Expanding Object (165548)



The information in this article applies to:

  • Microsoft Visual J++ 1.0
  • Microsoft Visual J++ 1.1

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.

MORE INFORMATION

Steps to Reproduce Behavior

  1. 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;
          }
       }
    						
  2. Step past the line "i = c1.i.
  3. 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.

REFERENCES

For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, see the following pages on the Microsoft Technical Support site:

Modification Type:MinorLast Reviewed:8/25/2005
Keywords:kbBug kbDebug kbide kbProgramming KB165548