Debugger working, requesting help using it...

I'm working with IDEA on RH Linux 7.3, developing a servlet-based webapp and have deployed it to Tomcat 4.1.12 for debugging. It seems to work fine, debugger launches and connects and everything.

However, I need help understanding where to go from there. You click a button or link in your application, and that causes it to run to the next breakpoint, right? OK, so far so good. Then you click "step into" and, with my application, the blue execution point highlighter moves to a completely unrelated method that isn't even called from the place it was at before. From there, as far as I can tell, the blue highlighter doesn't seem to follow the logic of the program. At one point it stops in the middle of some Javadoc comments. (Is that wrong or is there some reason it would do that which I don't understand?)

Maybe I have it set up wrong. I'm running Tomcat outside of IDEA, and launching it using "./catalina.sh jpda start".

Any help or information would be greatly appreciated.

Thanks,

Ethan

7 comments
Comment actions Permalink

>one point it stops in the middle of some Javadoc comments. (Is that wrong
or is there some reason it would do that which I don't understand?)

It is very likely that you sources and classes, that are executed, are
out-of-sync. Please rebuild the whole app and make sure you are executing
the latest version of classes.

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"




0
Comment actions Permalink

Is there any way that something like this could be detected at run-time? I have been bit by this as well. As long as the debugger is trying to debug something that is obviously wrong (like a comment), then there is no problem detecting it, but when its simply a wrong line, it is much more difficult.

Thanks,
Mike

0
Comment actions Permalink

You mean detecting the fact that a breakpoint is set to a line where it is
not actually supposed to be? Well, looks like it is possible but detection
won't work in all cases. I mean if the "UI breakpoint" and the breakpoint
that is actually set by the debugger are in the same method and class, it is
not possible to detect that the source and the class are out-of-sync.
However, the idea sounds good, have to think about it more thoroughly.

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"


"Michael Kirby" <kirby@ess.mc.xerox.com> wrote in message
news:4845299.1038716515950.JavaMail.jrun@is.intellij.net...

Is there any way that something like this could be detected at run-time?

I have been bit by this as well. As long as the debugger is trying to debug
something that is obviously wrong (like a comment), then there is no problem
detecting it, but when its simply a wrong line, it is much more difficult.
>

Thanks,
Mike

>


0
Comment actions Permalink

Why not use the last modified date of the .java file as compared to the last modified date of the .class file? If (when stoping at a breakpoint), the date of the .java file is more recent then the corresponding .class file, prompt the user that something might be wrong.


Mike

0
Comment actions Permalink

The problem is specific mostlty for remote-debugging, but this approach
won't work for it.

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"


"Michael Kirby" <kirby@ess.mc.xerox.com> wrote in message
news:3236462.1038830204720.JavaMail.jrun@is.intellij.net...

Why not use the last modified date of the .java file as compared to the

last modified date of the .class file? If (when stoping at a breakpoint),
the date of the .java file is more recent then the corresponding .class
file, prompt the user that something might be wrong.
>
>

Mike

>


0
Comment actions Permalink

The problem is specific mostlty for remote-debugging,
but this approach won't work for it.


Ahh.. So in this case, we have access to the source code, but the .class file isn't necessarily available. Presumably all the .class information is provided through the remote debugger interface, and "last modified" isn't available.

I don't suppose there is any kind of checksum that can be calculated on something that is available through the debugger interface.

Otherwise it seems all we are left with is detecting when the line the debugger say's it is at is an invalid line (for example, in a comment, or on a line for which a breakpoint is not possible). This is still better than nothing I suppose.

Mike

0
Comment actions Permalink

Otherwise it seems all we are left with is detecting when the line the

debugger say's it is at is an invalid line (for example, in a comment, or on
a line for >which a breakpoint is not possible). This is still better than
nothing I suppose.

Yep, this is what I meant..

--

Best regards,
Eugene Zhuravlev
JetBrains, Inc, http://www.intellij.com
"Develop with pleasure!"



0

Please sign in to leave a comment.