Eclipse streaking WebLogic debugging

Source: Internet
Author: User
Tags localhost 8888

It is best to do a breakpoint during project development ~ Eclipse is not comparable to myeclipse in this regard.
So we can't break points, right? Now, when my colleagues in the project use breakpoints, I naturally need to use them. 'some problems are recorded during the setup process!

Steps:
1. Use the compiler to open startweblogic. CMD in the Weblogic project directory, and add this sentence to it:
Set java_options = % java_options %-xdebug-xnoagent-djava. compiler = none-xrunjdwp: Transport = dt_socket, address = 8888, Server = Y, suspend = N

2. In eclipse
Right-click the project name and choose debug as-Debug configurations... -Select your project under remote Java application-set localhost 8888 under connect properties. The port corresponds to the address above.

3. Start the server, right-click the project name, debug as-Debug configurations...-click the debug button!
In theory, we can break the point!

PS: but here I am reporting an error:
"Unable to install breakpoint due to missing line number attributes, modify compiler options to generate line number attributes"

Summary of solutions found when this error occurs:
1. When ant is used for compiling, the debug switch is not enabled. When writing a javac task, check that DEBUG = true; otherwise, debugging cannot be performed. The settings for the eclipse compiler don't affect the ant build and even if you launch the ant build from within eclipse. ant controls it's own compiler settings. you can tell ant to generate debugging info like this 'javac... DEBUG = "true "... />
2. For compiler settings, window-> preferences-> JAVA-> compiler checks all line number attributes to generated class files in the classfile generation area on the compiler start page. If this option is already selected, apply it again. You can also set it at the project level. Choose Project Properties> Java compiler on the start page.
The error reported by eclipse is caused by these two reasons.

The first point is the default version of Eclipse, which does not need to be changed! The second point is that the compilation of java files during ant deployment does not have the DEBUG = "true" attribute!
Add it and re-compile and deploy the startup server. Click debug to run the project, and you will be able to perform breakpoint debugging normally!

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.