Problem with remote debugging of tomcat 5.0.x

Hi,

i'm trying to set up the debugging of tomcat 5. The tomcat integration did not work so i tried to use the remote debugging. This does not work as well:(

Using the eclipse remote debugger everything works fine.

I'm using IDEA 4.5.2 build 2244 on a winXP professional with jdk 1.4.2_04.

My Tomcat 5.0.28 is started with
-Xdebug -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

In some thread i read there where some similar problems with earlier versions.

Any help/info would be great, TIA, Leif

5 comments

What does "did not work" mean? Was there a message that perhaps holds a clue we need?

I'm using IDEA 4.5.2 on OSX in both integrated and remote mode so the features certainly. Remote has always worked, even in older versions.

I would make sure IDEA and Tomcat are talking the same transport and address (I believe this information is in the catalina.bat file) as I don't believe they default to the same values for each. At least they didn't on my OSX machine.

0

Thanks for your help.

Here are some more details.

My Tomcat is using:
-Xdebug -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n

When trying to use remote debugger, i set transport to socket, debugger mode to attach and address to localhost on port 8000.

So I think it should match with the settings of my tomcat running in debug mode.

When i start the idea debugger, i got this message:

Connected to the target VM at 'localhost:8000' using socket transport.

But that is it! In the thread tab i could see:
"The application is running" but there are no threads listed.


Trying to use the integrated tomcat server it got this message:

Check your run/debug configuration. Failed to establish connection to the target VM at 127.0.0.1:8000 using socket transport.

Inside the idea logs i found this:

2004-11-06 21:12:26,152 INFO - lication.impl.LaterInvocatorEx - leaveModal:com.intellij.openapi.g.a.a$d_[dialog54,516,584,687x114,invalid,hidden,layout=java.awt.BorderLayout,modal,title=Cannot Debug Application,defaultCloseOperation=DO_NOTHING_ON_CLOSE,rootPane=com.intellij.openapi.g.a.a$4[,4,30,679x80,layout=javax.swing.JRootPane$RootLayout,alignmentX=null,alignmentY=null,border=,flags=449,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]

Is there a way to got some more log infos?

TIA, Leif

0

>Connected to the target VM at 'localhost:8000' using socket transport.
>
>But that is it! In the thread tab i could see:
>"The application is running" but there are no threads listed.

That sounds right. I don't think you see anything until it hits a breakpoint. Try putting a breakpoint in one of your servlets and see what happens when execution hits that point.

0

Setting a breakpoint have no effect. When the breakpoint it hit, the debugging did not stop. Instead it changes the valid line breakpoint into a invalid line breakpoint.

I tried using my ant task to compile the sources as well as the "rebuild project". Same effect.


Do you have a tip or idea why the integrated tomcat is not able to debug my application?! In this szenario the tomcat is started with the message, that my debugger settings are not well set:( Nevertheless the tomcat is running properly, expect the debugger.

TIA, Leif

0

It works!!!

My problem was that i have had the jar and the classes besides in the classpath:

  • my ant task compiles my sources to /tmp/classes

  • my ant task makes a jar from it in /webapp/WEB-INF/lib

  • when i let idea compile a class it is although copied to /tmp/classes and i think this is the problem. I guess that now the /tmp/classes is an 'active' classpath element.


Hope that the integrated tomcat server now works as well:)

Thanks so far, Leif

0

Please sign in to leave a comment.