• 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

debug j2ee application from Eclipse

 
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I don't start applicatin server from Eclipse, i.e. I start the app server from command line. Then can I still use Eclipse to debug the j2ee application ? I thought I can only debug the application if I use install an application server plugin and start from Eclipse. Is my understanding correct ?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Raj,
Not necessarily. You can use the Eclipse remote debugger if your configuration supports it.
 
Saloon Keeper
Posts: 27764
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
The Sun JVM has built-in remote debugging support. Most app servers, including Tomcat, have an option in their startup scripts to switch on that debugger. In fact, the sysdeo Tomcat plugin does pretty much just that - it starts a copy of Tomcat, then does an automatic remote debugging connection to it.

The only constraint is that to debug properly, the application's source code available to Eclipse must match the compiled classes on the server. If it isn't, the breakpoints won't match up properly and you'll probably get very confused.
 
Raj Ohadi
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess I did not explain it very well in my post. It is not for a remote debugging. I installed an application server and Eclipse on my PC, also I installed an application server plugin for eclipse. However, the plugin has some problem so I can't start the application server from eclipse. But I can start the server from command line.

My j2ee application code is in eclipse, so in this case, after I deploy the code, can I use command line to start the application server and use eclipse to debug ?
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Raj Ohadi:

My j2ee application code is in eclipse, so in this case, after I deploy the code, can I use command line to start the application server and use eclipse to debug ?



If you are starting the app server from command line, you would need to use remote debugging. Remote debugging can be done using Eclipse IDE. But it needs few configuration to be done on App Server start-up scripts and Eclipse runtime configurations.

Check the help documentation of Eclipse to get information on Remote debugging.
 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Raj Ohadi:
If I don't start applicatin server from Eclipse, i.e. I start the app server from command line. Then can I still use Eclipse to debug the j2ee application ? I thought I can only debug the application if I use install an application server plugin and start from Eclipse. Is my understanding correct ?



In short yes you can.
You can go to application server console and set to start server in debug mode. In eclipse you have to set to listen to the debug port which is server specific.
 
Whip out those weird instruments of science and probe away! I think it's a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic