Someone to use the WebApp development function, but like myeclipse such a giant object. With jetty, you can easily configure a container that is faster and more convenient than Tomcat, so it is strongly recommended when debugging. Let's look at how to configure it below.
First, configure an external tool to run Jetty:
Select Menu Run->external tools->external Tools ... Select Program on the left, then click New:
Configure location as MVN complete command line.
Select working directory for this project.
Arguments fill in: Jetty:run
Then click Enviroment Page: Add the maven_opts variable, the value is:
-xdebug-xnoagent-djava.compiler=none-xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=y
Where, if suspend=n means not debug, run directly.
Then, click Apply, and then close this dialog box.
Also note that the External Tool menu item appears under the perspective of the Java browering. If you can't see in Java, you can switch to try it.
New Run Configuration below:
Click to select Run->debug ...
Select the remote Java application in the left tree, and then click New.
The key to selecting your project is to fill in the same port number as before when you set up external tools.
The configuration is complete, the front start debugging run:
The first thing to do is to run the jetty (a bit like Tomcat's running appserver) and run it from the Run->external tools in a previously configured external tool, and log will show:
Listening at Port 4000,
Select Run->debug Select our newly built run configuration, then the program run up, you can access through the Web, set breakpoints debugging.
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.