Remote debugging Tomcat: connects but does nothing

Hi,

Trying to switch for Eclipse to IDEA 6.0.1... A webapp built and deployed to Tomcat 5.5.15 using Ant (not with IDE's build options) is accessible to the debugger in Eclipse using a socket transport to localhost:53007.

It works in Eclipse. It doesn't do much at all in IDEA. When I connect, I see this in the debug console:
Connected to the target VM, address: 'localhost:53007', transport: 'socket'
Connected to server

...and it opens up the start page in my browser. Unfortunately, apart from the above two lines in the console, I see no feedback from the server (the thread list is totally empty, and no breakpoints are triggered).

Can anyone advise me as to what I should be looking at to find a solution?

Thanks,
Chris

0
8 comments

What IDEA Run/Debug configuration do you use? What are the Tomcat startup options that you use to enable debugging?

0
Avatar
Permanently deleted user

What IDEA Run/Debug configuration do you use? What
are the Tomcat startup options that you use to enable
debugging?


I've attached a screenshot of the run configuration. For the Tomcat startup parameters, I use:

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

(in Eclipse, the "java.compiler" and "noagent" parameters aren't necessary. It Just Works).

Furthermore, the "log file" tabs remain empty even although the files exist and are regularly updated.

Thanks,
Chris



Attachment(s):
debug-config.PNG
0

I can't reproduce the problem.

I've created a simple project, deployed it manually on Tomcat server and Debugged from IDEA using Tomcat Remote Run/Debug configuration.

Please note that Threads and Frame windows are filled with data only when breakpoint is hit. Do you have breakpoints configured in IDEA? Do you open the pages in the browser that trigger breakpoints? If you are debugging servlets, make sure your Ant javac task has debug=on attribute set.

You can configure additional logs in the Log tab of the Run/Debug configuration. Note that IDEA will start showing the log lines that appear only after you connect to the server.

If the problem remains, please provide a sample project illustrating it and the exact instructions how to set up Tomcat on the isolated system to run it.

0
Avatar
Permanently deleted user

Thankyou for your feedback. It's tricky to setup a similar project, and I'm aware my description doesn't give you a lot of information, so I guess I'm a bit stuck.

I do indeed have breakpoints in the code. When I hit them, IDEA seems to just sit about doing nothing and the browser just waits. The same breakpoint in Eclipse is detected and debugging can begin, and the browser reacts as expected as I step through code.

- Chris

0

What OS do you use? Do you have method breakpoints set somewhere in the servlets or do you debug JSPs only?

0
Avatar
Permanently deleted user

From Tomcat's "version.bat" script:

Using JRE_HOME: C:\java\jdk5
Server version: Apache Tomcat/5.5.15
Server built: Jan 3 2006 10:12:35
Server number: 5.5.15.0
OS Name: Windows XP
OS Version: 5.1
Architecture: x86
JVM Version: 1.5.0_08-b03
JVM Vendor: Sun Microsystems Inc.

The method breakpoints are in code (an internal API, deployed in the "classes" directory), called from JSPs.

- Chris

0

Does it help if you remove all the method breakpoints and put breakpoints inside methods? Method breakpoints are pretty expensive and can cause huge performance degradation.

0
Avatar
Permanently deleted user

It all works all of a sudden, without any apparent changes. In any case, the debugger's much friendlier than in Eclipse, so I'm just glad that it works.

Even if I can't explain what happened, I appreciate the time you took to try and help.

- Chris

0

Please sign in to leave a comment.