0

Is a Java program debuggable only when the VM is running in Debug Mode?
Is there any way to change it at runtime?

0

2 Answers 2

1

No, there's no way to change it at runtime.

If at all possible, you will have to use a profiler

Sign up to request clarification or add additional context in comments.

2 Comments

I found the jinfo is available for changing some flags of VMs. But as you mean it could not be used to turn on something like the Debug mode, am I right?
~O~. In my mind, I just consider the profiler as an performance analysis. Thanks I will have a try later. I am interested in what it could show out~
0

I don't believe you can suddenly debug if it's not compiled with the -g option. Your only option is to recompile and redeploy. But once it's in place you can debug at will.

4 Comments

the question is about java not gcc
Does that mean you guys normal use other facilities to find out the system problems like event log except the jdb?
When a running system meet an issue and the program is not running on debug mode, Should I trace out the problem via the event log?
In GDB world, I could load the symbols files into the debugger, when I need them. Do you mean the Java could not do it?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.