How to set breakpoints in Eclipse, and debug Ah ~
//===============================
With the Eclipseme plug-in, in the preference inside the Java--debug Debuger timeout to 15000ms, while confirming
Suspend execution on uncaught exceptions and suspend Executioen on complication
Errors is not selected, then debug as emulated MIDlet, and then Debug.
Why does this debug always go into some basic class libraries, and the underlying class libraries are not yet found, which is why. I don't want to get in here.
Some base class library, too much. I was in a spin.
//-----------------------
A simple explanation for a breakpoint is to tell the compiler to stop when it executes to that point, to make it easier for the user to see the current situation, including
variables, and so on.
The eclipse's set breakpoint is simple, in the Java view, directly to the left of the line where you want to set the breakpoint, double-click it, and the right button
have this option.
Mode selection debug can automatically enter the debug view, F6 Single Step
//-----------------------
Before you want to debug the location of the left-click, there is a power outage. The program runs to the debug mode when the power is off, you can view a
Changes in the variables, from the observation of the program is correct or not
-----------------------window focus is on eclipse, I can't find f5,f6 those debugging features.
In the debug view you should find step in, step over. and other functions
are generally set to get the value of the place, see the value is not or the value has changed no
or set it in a statement to see if I can run to this sentence
After the breakpoint is set, Eclipse runs the program to the debug interface.
Breakpoint information and variable values are displayed in the Debug view, and Eclipse automatically switches the view to the debug view when debugging.
If you want to debug JSP, you need to set up a good application server, you can debug, very convenient.
//============================
Debugging with Eclipse 2.1.1 Windows works fine if you allow the
Debugged VM to exit. Otherwise, mine just crashed the moment when
Eclipse attached.
1. For wtkrun with debug= "3452" or some other port
2. Make a debugger config for remote debugging
3. Enable "Allow Termination of remote VM"
4. Specify the same port in debugger Config
5. Just leave the host name blank
6. Never start the debugger before the emulator
Step 6 is important, otherwise your your eclipse hang up
and block. Wait for the emulator to get ready (it won ' t start
Execution though) and then connect from Eclipse. Interestingly enough, it
Seems to is ready it prints "VM not ready".
If the emulator complains about address already in
A different port. Be sure to change the port both in Wtkrun and
Debug CONFIG. Sometimes it seems that a locked debugger or crashed
Emulator wastes a port. Maybe something with Windows. Just to
Another. Or reboot ...
Once the connection is up it works like a charm, source level
Debugging and local variables are as your expect them to be.