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

By default the compiler includes debug information. You can add compiler flags to turn that off.
This is the reverse of how many C/C++ compilers work.

Thanks jwenting,

By default the compiler includes debug information. You can add compiler flags to turn that off.
This is the reverse of how many C/C++ compilers work.

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?

What do you mean "reverse of how many C/C++ compilers work"? I think Java compiler is very similar to C/C++ complier. Why you say reverse?


regards,
George

Please try to understand what debug information actually is...

Of course the deliverable will be different between compilation with and without debug information. That's the whole point :)

Thanks jwenting,

Please try to understand what debug information actually is...

Of course the deliverable will be different between compilation with and without debug information. That's the whole point :)

Your reply is very helpful. Do you know what debug information has been added?


regards,
George

This article has been dead for over six months. Start a new discussion instead.