How to set breakpoints and debug in eclipse

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.