• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

IntelliJ debug with Tomcat 5

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
I have a web application developed with Hibernate, Spring and WebWork.
I want to set some break points inside my WebWork actions and step through them while the application is running under Tomcat.
How to set up that ?
I read IntelliJ docs but there are alot of things I don't understand.
What is Local and Remote ?
How to run Tomcat in debug mode ?
Would you mind writting a little items of required steps ?
Thanks.
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Remote debugging is when the JVM opens a tcp/ip network port which a debugger uses to communicate with the JVM. It's considered "local" debugging by IntelliJ if the program being debugged is on the same host, but the communications is still over tcp/ip ports, just internal ones.

Normally, when IntelliJ debugs a tomcat app, it launches an embedded Tomcat and connects via the debugging port. You have the option of "parking" the app to give you time to set breakpoints before actually launching it, or of going straight into the app and setting breakpoints as needed. Setting breakpoints in IntelliJ is as simple as clicking in the border area to the left of the displayed source code line. A "bullet" will appear to indicate the breakpoint. More complex breakpoints can also be made (such as only when certain tests are true), but the idea (no pun intended ) is the same.

For debugging a simple, single webapp, local debugging is enough. If you have a more complex setup, such as client-server testing, 2 webapps running together, or other situations where more than one app is running at a time, remote debugging is required. If you look in the TOMCAT_HOME/bin directory, I think the comments on the Tomcat scripts indicate how (and on which port) to get Tomcat into remote debugging operation - you have to indicate at JVM startup if you want debugging.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic