Debugging JSPs (breakpoints) does not work [message #188561] |
Sat, 24 February 2007 18:57 |
Eclipse User |
|
|
|
Originally posted by: matthias.kaeppler.dfki.de
Hi,
we are working on a JSP-based wiki-system and ported the project structure
to a WTP 'dynamic web project' just recently. We use the WTP-Server
project container to deploy the wiki in a Tomcat 5.5 instance.
I noticed however that debugging JSPs does not work, i.e. breakpoints in
JSPs are never activated (they always miss the checkmark indicating that
the breakpoint is reachable). Debugging normal Java classes works just
fine.
Any ideas why this doesn't work? The documentation indicates that this
should be possible out-of-the-box.
Thanks in advance,
Matthias
PS: I tried activating the "Enable Tomcat debug mode" in the server
settings panel (effectively adding the -debug flag to the server startup
context), but this only yields an error message:
"Bootstrap: command "-debug" does not exist."
|
|
|
Re: Debugging JSPs (breakpoints) does not work [message #188575 is a reply to message #188561] |
Sun, 25 February 2007 17:28 |
Eclipse User |
|
|
|
Originally posted by: matthias.kaeppler.dfki.de
Meanwhile I noticed a bug report indicating that WTP 1.x screws up the
order of the -debug flag which is inserted after the 'start' command in
the run-config (as opposed to before it) and also doesn't correctly remove
it again when unchecking debug mode. According to the report, this will be
fixed in 2.0.
However, even when I manually place the -debug flag before the 'start'
command in the run config, I only get a usage message from tomcat:
usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [
-nonaming ] { start | stop }
It seemingly doesn't support a flag called '-debug' at all.
Does that mean I can't debug JSPs with Tomcat whatsoever?
-M.
|
|
|
|
|
|
Re: Debugging JSPs (breakpoints) does not work [message #189057 is a reply to message #188993] |
Sat, 03 March 2007 17:30 |
Eclipse User |
|
|
|
Originally posted by: matthias.kaeppler.dfki.de
Larry Isaacs wrote:
> I'm not sure what you mean by "they always miss the checkmark indicating
> that the breakpoint is reachable".
AFAIK the small checkmark overlay on a breakpoint icon indicates that a
breakpoint is reachable in terms of execution flow. That is never the case
for me with breakpoints in JSPs. Plus, when I open a JSP, set a breakpoint
and then select "Debug As --> Debug on server" I get an error message:
"Server Error - The selection is not within a valid module".
What does that mean?
-M.
|
|
|
|
|
|
Re: Debugging JSPs (breakpoints) does not work [message #189651 is a reply to message #189134] |
Mon, 12 March 2007 15:27 |
Eclipse User |
|
|
|
Originally posted by: matthias.kaeppler.dfki.de
Larry Isaacs wrote:
> The "not within a valid module" problem has been a stubborn bug that
> should be fixed in WTP 1.5.3 and WTP 2.0. [...]
I'm using WTP 1.5.3. Are you sure it was claimed to be fixed for this
version? Otherwise I would reopen the bug report, as it seemingly is still
making trouble. In fact, I can't debug anything besides plain old Java
sources right now. I also can't debug custom JSP tags, which in fact are
implemented as plain Java.
Regards,
Matthias
|
|
|
Re: Debugging JSPs (breakpoints) does not work [message #189668 is a reply to message #189651] |
Mon, 12 March 2007 15:57 |
Eclipse User |
|
|
|
Originally posted by: matthias.kaeppler.dfki.de
Matthias Käppler wrote:
> Larry Isaacs wrote:
>> The "not within a valid module" problem has been a stubborn bug that
>> should be fixed in WTP 1.5.3 and WTP 2.0. [...]
> I'm using WTP 1.5.3. Are you sure it was claimed to be fixed for this
> version? Otherwise I would reopen the bug report, as it seemingly is still
> making trouble. In fact, I can't debug anything besides plain old Java
> sources right now. I also can't debug custom JSP tags, which in fact are
> implemented as plain Java.
> Regards,
> Matthias
I just made an interesting observation regarding this topic, by mere
coincidence actually (while messing around with the run config):
The "selection is not within a valid module" error only occurs, when I try
to debug a JSP like this:
1) Open the JSP
2) right click inside --> Debug as... --> Debug on server
However, if I do it like this:
1) Open JSP
2) right click --> Debug as... --> Debug... and then manually select the
default run target (which should actually be the very same as when
directly saying "debug on server", especially since I only have one single
run config for that project and server), then it works!
However, I have to explicitly do this for *every* JSP I want to debug
*separately*, which is just plain annoying.
What I still don't understand is why it seems to work fine for everyone
else. Do you think I should file a new bug report regarding this issue?
Cheers,
Matthias
|
|
|
Re: Debugging JSPs (breakpoints) does not work [message #189684 is a reply to message #189668] |
Mon, 12 March 2007 16:51 |
Larry Isaacs Messages: 1354 Registered: July 2009 |
Senior Member |
|
|
The only "not within a valid module" bug that is still around is
https://bugs.eclipse.org/bugs/show_bug.cgi?id=166419. It seems to occur
only if a certain plug-in startup order occurs. It only applied to
invoking Run, Debug, and Profile on Server from the editor's context
menu. Using Run, Debug, and Profile on Server when selecting the JSP in
the Project Explorer, Package Explorer, or Navigator views still worked,
if I recall correctly. Does Debug On Server fail when using one of
these navigator views?
The Debug As -> Debug approach simply runs the chosen server, which is
equivalent clicking the "Debug" icon in the Servers view. No attempt
will be made to open the resource in a browser. The Debug on Server
tries to match the selected resource to a server to create a URL with
which to invoke the browser. It's that "matching" operation that is
causing the problem.
With respect to breakpoints not working, where did your Tomcat come
from, i.e. did you download it, unzip or install it, and use it without
any configuration changes? When you create a Tomcat server, it uses its
current configuration, which may or may not be development friendly.
The default configuration that comes with the download is known to be
development friendly.
Cheers,
Larry
Matthias Käppler wrote:
> Matthias Käppler wrote:
>
>> Larry Isaacs wrote:
>
>>> The "not within a valid module" problem has been a stubborn bug that
>>> should be fixed in WTP 1.5.3 and WTP 2.0. [...]
>
>> I'm using WTP 1.5.3. Are you sure it was claimed to be fixed for this
>> version? Otherwise I would reopen the bug report, as it seemingly is
>> still making trouble. In fact, I can't debug anything besides plain
>> old Java sources right now. I also can't debug custom JSP tags, which
>> in fact are implemented as plain Java.
>
>> Regards,
>> Matthias
>
> I just made an interesting observation regarding this topic, by mere
> coincidence actually (while messing around with the run config):
>
> The "selection is not within a valid module" error only occurs, when I
> try to debug a JSP like this:
>
> 1) Open the JSP
> 2) right click inside --> Debug as... --> Debug on server
>
> However, if I do it like this:
>
> 1) Open JSP
> 2) right click --> Debug as... --> Debug... and then manually select the
> default run target (which should actually be the very same as when
> directly saying "debug on server", especially since I only have one
> single run config for that project and server), then it works!
>
> However, I have to explicitly do this for *every* JSP I want to debug
> *separately*, which is just plain annoying.
>
> What I still don't understand is why it seems to work fine for everyone
> else. Do you think I should file a new bug report regarding this issue?
>
> Cheers,
> Matthias
>
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08809 seconds