JPDA and IDEA

Hi,

I have just started with debugging Servelts using JPDA and love the way
it should work...however there are some problems that spoil my
delight...

Frankly, some breakpoints are being ignored: I use Resin Pro as the
container where the service is deployed (as a .war). I've put some
breakpoints in the methods of classes that are deployed. Then I wrote a
JUnit-TestCase which calls some of the methods containing the
breakpoints.

Now several breakpoints work however some don't - eg. I've put one in my
own toString() method which is called (I changed the text several
times to make it sure) and he never breaks at that point while others
work...this is really annoying. :(

So is this me missing something, IDEA (5.0.1), Resin Pro (3.0.14) or JDK
(1.5.0_04)?

TIA,
-hs

3 comments

I have just started with debugging Servelts using JPDA and love the way
it should work...however there are some problems that spoil my
delight...

>

Frankly, some breakpoints are being ignored: I use Resin Pro as the
container where the service is deployed (as a .war). I've put some
breakpoints in the methods of classes that are deployed. Then I wrote a
JUnit-TestCase which calls some of the methods containing the
breakpoints.

>

Now several breakpoints work however some don't - eg. I've put one in my
own toString() method which is called (I changed the text several
times to make it sure) and he never breaks at that point while others
work...this is really annoying. :(

>

So is this me missing something, IDEA (5.0.1), Resin Pro (3.0.14) or JDK
(1.5.0_04)?


Maybe I should add, that I use spring (1.2.5) and offer functions using
Hessian-Webservices which I call from the TestCase.

-hs

0

Hynek Schlawack wrote on 24/09/05 05:11:

Now several breakpoints work however some don't - eg. I've put one in my
own toString() method which is called (I changed the text several
times to make it sure) and he never breaks at that point while others
work...this is really annoying. :(


I'm using Resin standard, spring, and IDEA's debugging but havn't seen
anything like this. Is it possible that when you call your toString()
method, the instance of that object is running in Junit's VM rather than
the remote one being debugged?

If you've returned an object from your webservice, the returned object
may be fully serialized into your local VM.

Try running the junit testcase through the debugger as well as resin,
single step the test case - does that show anything?

0

Hi,


>> Now several breakpoints work however some don't - eg. I've put one in my
>> own toString() method which is called (I changed the text several
>> times to make it sure) and he never breaks at that point while others
>> work...this is really annoying. :(

I'm using Resin standard, spring, and IDEA's debugging but havn't seen
anything like this. Is it possible that when you call your toString()
method, the instance of that object is running in Junit's VM rather than
the remote one being debugged?


Well it seems so while it shouldn't...see below.

If you've returned an object from your webservice, the returned object
may be fully serialized into your local VM.


That seems to be the point. Is there some rule when it does so? This
makes it pretty hard to debug...

Try running the junit testcase through the debugger as well as resin,
single step the test case - does that show anything?


Yes, it visits the breakpoints. Thanks a bunch for the hints. (just in
case, do you anything special to start resin in debug-mode or just using
the Java-parameters? Tomcat seems to have an own argument for it.)

-hs

P.S. I'm pretty impressed, that I can debug severak projects at once -
IDEA rocks. :)

0

Please sign in to leave a comment.