4

Here is what I am seeing in my debug view. enter image description here The second picture enter image description here

I want to examine the state of all the local variables so I can understand why a UnsupportedAudioFileException is being thrown. The first picture looks fine (all the values of the local variables are shown in the variables view). However the second picture, after i step into AudioSystem.getAudioInputstream only shows one local variable, arg0, that I don't even know where that name came from. What happened to the other local variables - providers, audiostream, file ?

I looked at possible other threads. No variables shown in eclipse debugging couldn't be my issue because I set a valid breakpoint inside AudioSystem.getAudioInputstream I don't think my issue is this either Locally declared variables can not be inspected because this class didn't ship with the JDK (got it from an external source)

Does anyone know how to show the correct local variables?

Community
  • 1
  • 1
committedandroider
  • 8,711
  • 14
  • 71
  • 126

2 Answers2

1

Look at the image in your tab. You can clearly see that you have stepped into a file for which Eclipse does not have the source (the image has the small J with binary to indicate that AudioSystem is a class file).

As such, the debugger does not have the information for local variables. If you would attach source, your debugger would be able to provide you with additional symbols.

stevebot
  • 23,275
  • 29
  • 119
  • 181
  • What image are you referring to? – committedandroider Dec 03 '14 at 19:20
  • @committedandroider in your first image, you are still in a file for which you have source (notice the different icon for that tab), but for the second image, you are in a class file with no attached source. – stevebot Dec 03 '14 at 19:22
  • What do you mean? I still can see source code in the second image. – committedandroider Dec 03 '14 at 19:23
  • @committedandroider yes, but you do not have the raw source (either source files or a source JAR), so the IDE can only provide you with limited data (source code, but no symbol information). As you have pointed out, you can observe that this file is a part of a JAR which has limited debug information. – stevebot Dec 03 '14 at 19:27
  • Yeah it's weird cause I didn't even notice it was a class file. From http://stackoverflow.com/questions/1015340/class-vs-java, class file a compiled .java file, binary(usually) – committedandroider Dec 03 '14 at 19:29
1

Actually after looking a bit further in this thread Locally declared variables can not be inspected and the key phrase "the rt.jar that ships with the JDK (where the core Java classes live) is not compiled with full debug information included in the .class files, so the debugger does not have local variable info.", I went back into java perspective and saw that this class file was inside rt.jar

Community
  • 1
  • 1
committedandroider
  • 8,711
  • 14
  • 71
  • 126