• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to debug!  RSS feed

 
Kirtipur Itagol
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i'm using Ant to build the WAR, and using Eclipse IDE and Tomcat 5.0 as a server. Now I want to debug my app using some breakpoints. But when I hit a button in my page, the breakpoint/ and debug mode of Eclipse is not working. Is it something to do with ANT? How to tackle this situation so that I can go to each line for debugging!!
 
Greg Charles
Sheriff
Posts: 3015
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably just a matter of setting the debug flag in Ant's javac task. See here. You might get a better answer in the Ant forum here.
 
Samuel Cox
Ranch Hand
Posts: 96
Scala Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the command line, start Tomcat with this command:

catalina.bat jpda run

You'll have to set some environmental variables for this to work. Do a google search for 'catalina.bat jpda'. That will probably turn up some pages that will detail the process.

After tomcat starts, you'll have to use the eclipse debugger for Remote Java Application, which requires the port you specify in the environment variable (JPDA_TRANSPORT if I recall correctly) as well as a few other things.
 
Santhosh Kumar
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if this is relevant, in Eclipse you should start the application in Debug mode for it to actually break at the specified break points.

So if you press Ctrl+F11, it would run last application (does not break)
If you press F11, it would debug the last application (does break)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!