aspose file tools*
The moose likes Beginning Java and the fly likes Question about debugging .class file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Question about debugging .class file" Watch "Question about debugging .class file" New topic
Author

Question about debugging .class file

George Lin
Ranch Hand

Joined: Jan 11, 2005
Posts: 125
Hello everyone,


When debugging a C or C++ binary file, the file is different from the release version of binary file (debug version binary file is larger). My question is, if we want to debug a Java binary file (.class file), is the version of file (which we use to debug) the same as the file (which we are going to release)? If they are different, shall we add some additional options to compiler in order to make debug version binary file be different from release version binary file?


thanks in advance,
George
Rick O'Shay
Ranch Hand

Joined: Sep 19, 2004
Posts: 531
A javac switch is required to include debug information in the class file:

George Lin
Ranch Hand

Joined: Jan 11, 2005
Posts: 125
Thanks Rick,


Originally posted by Rick O'Shay:
A javac switch is required to include debug information in the class file:



Your reply is very helpful. Suppose we compile .class file into debug status (so that we can use F6, F7 and F8 in Java IDE to debug .class file). Do you mean the .class file (which we use to debug as mentioned above) is different from the file which we are going to release?


regards,
George
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about debugging .class file