How to set breakpoints and debug in eclipse

Source: Internet
Author: User

How can I set breakpoints and debug them in eclipse ~

// ======================================

Use the eclipseme plug-in to adjust the debuger timeout of Java -- debug to 15000 ms in the preference, and confirm

Suspend execution on uncaught exceptions and suspend executioen on complication

Errors is not selected. Then, debug as emulated MIDlet during debugging, and then debug it.

Why does this debug always go to some base class libraries, and these base class libraries are not found yet? I don't want to enter this

There are too many base class libraries. I'm confused about debugging.

//-----------------------

A simple explanation of the breakpoint is to tell the compiler to stop when it executes to this point (this sentence), so that you can see the current situation, including

Variables.

It's easy to set breakpoints in eclipse. In the Java view, double-click the far left of the line where you want to set breakpoints, right-click

This option is available.

Debug mode is used to automatically go to the debug view.

//-----------------------

Double-click the left button in front of the program you want to debug, And the disconnection will occur. When the program runs to power-off, it will enter the debug mode. You can view

Variable changes, from the observation of the program is correct or not

// ------------------------- The focus of the window is located in eclipse. after entering the window, I cannot find F5 and F6 debugging functions.
In the debug view, you should find functions such as step into, step over...

It is usually set where the value is obtained. The result shows that the value does not exist or the value has changed.
Or you can set it in a statement to see if the statement can be run.
After the breakpoint is set, eclipse runs the program on the debug interface.

Breakpoint information and variable values are displayed in the debug view. During debugging, eclipse automatically switches the view to the debug view.
To debug JSP, you need to set up the application server and debug it easily.

// ==================================

Debugging with eclipse 2.1.1 windows works fine if you allow

Debugged VM to exit. Otherwise, mine just crashed the moment when

Eclipse attached.

1. For wtkrun use DEBUG = "3452" or some other port you like
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 you make your eclipse hang up on you

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 be ready when it prints "VM not ready ".

If the emulator complains about address already in use, move on

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 move on

Another. or reboot...

Once the connection is up it works like a charm, source level

Debugging and local variables are as you have CT 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.