dcsimg
Run->Debug (Webapp tab). How does it work?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   monas_tary
Posted On:   Wednesday, August 21, 2002 01:00 PM

Does this enable me to debug any (that is in my project) application that is a servlet? How do I configure the values on this page? What other things must I do to get it work? Currently I see no valus in the field webapplications (to choose from) even though my project contains a servlet. The form's fields are: WebApplication [ ] Application Server [Tomcat/JServ] Debugee Host [ ] Debugee Port [ 5050 ] What does the Debugee Host/Port refer to (to host/port that the Application server is running on?).    More>>

Does this enable me to debug any (that is in my project) application that is a servlet?

How do I configure the values on this page?

What other things must I do to get it work?

Currently I see no valus in the field webapplications (to choose from) even though my project contains a servlet.



The form's fields are:


			
WebApplication [ ]
Application Server [Tomcat/JServ]
Debugee Host [ ]
Debugee Port [ 5050 ]


What does the Debugee Host/Port refer to (to host/port that the Application server is running on?).


thanks.


btw: my version is eap-build 640.

   <<Less

Re: Run-&gt;Debug (Webapp tab). How does it work?

Posted By:   Joe_Morse  
Posted On:   Tuesday, September 3, 2002 03:51 PM

In order to debug a servlet/JSP app you'll need to attach the IDEA debugger to a port on the machine running your app. Basically, the code executes on the remote machine, sends the debug information through a port, which your debugger is attached to.



The first step is to configure your app server to put debug information out to a port. This is done by specifying several properties for the JVM. Add these properties to the java.exe command line call int eh Tomcat configuration:




-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=9009,server=y,suspend=n

This instructs your app server to send debugging information out to port 9009. You would then configure IntelliJ to attach to a remote port:




  1. Run-->Debug

  2. Click the "Remote" tab.

  3. Click the "+" button to add a new app.

  4. Select "Socket" as the transport.

  5. Enter the host (the machine running the web app) and port (9009 in our case)

  6. Uncheck "Compile modified before..."

  7. Click the "Debug" button.



IDEA will not attempt to connect to the port you specified. Set a break point in one of your servlets, then load the servlet in a browser. The debugger should come up on the breakpoint.

About | Sitemap | Contact