- This topic has 10 replies, 2 voices, and was last updated 20 years, 4 months ago by Riyad Kalla.
-
AuthorPosts
-
Milind RaoMemberThis has definitely been asked and answered, but after going through the previous answers, I’m just as confused.
I created a Web Project and deployed it using MyEclipse as an exploded archive to Tomcat.
I’d like to view and set break points in the compiled JSP. What I’m getting when I step through the stack is the JSP source which is of no use. How can I see the compiled JSP source in the debugger and set a break point in the service method?
Setup
——–
Windows 2000 Professional Build 2195
Eclipse 3.0, Build id: 200406251208
MyEclipse 3.8 Beta 2, ver 3.7.200
Tomcat 5.0.24
Riyad KallaMemberWhen you set a breakpoint in the JSP page and step through it, it will step through the JSP page, not the generated servlet that Tomcat creates… is this what you were asking?
Milind RaoMemberYes. That’s what I wanted to know.
In the JSP, if I have called a tag and I have a breakpoint in the tag code, I can see the servlet in the call stack in the debugger, but the source is not displayed. Is there any way for me to display the source code so I can then set a breakpoint in the service method? Thanks.
Riyad KallaMemberMilind,
IIRC trying what I’m going to suggest might make debugging kind screwy, so back out the change if it doesn’t work… what you can try is to add the base directory of the generated JSP-servlets under the Tomcat\work directory to your project as a source folder, that way when the debugger does step into the servlet (generated code) it can find the source and display it for you.Let me know if that works.
Milind RaoMemberThat does work, but it creates a whole bunch of errors like
“The method _jspx_meth_html_base_0(HtmlTag, pageContext) is undefined for the type AlertDef_jsp
Riyad KallaMemberI’m glad it helped for debugging, but as you found out this isn’t a supported setup so its a “use at your own risk” or in this case “use at your own annoyance” situation.
Milind RaoMemberActually, it doesn’t help in the debugging. I can see the source (with the errors) and set a breakpoint, but it doesn’t stop at the breakpoint. I’d have thought that this would be very high on everyone’s wish list. No one gets NullPointerExceptions? This is the first time I’m doing web development with Eclipse. The last time I did web development, VAJ was still around. That had superb JSP debugging. Not only could you set BPs in the compiled JSPs, you could actually step line by line seeing the html page being generated.
Riyad KallaMemberOh, sorry I thought it worked.
I will check on the state of this, but honestly we’ve never had a request for it except for 1 gentleman that did this while trying to get JSP debugging to work on accident.
Riyad KallaMemberMilind,
I checked with the team and we aren’t going to officially support this type of debugging, and actually don’t know of a IDE that does.
Milind RaoMemberIf I’m not mistaken, WSAD does that. I’ll have to see if the web tooling just released by IBM will allow me to do this.
Riyad KallaMemberAhh, I haven’t used WSAD before.
Also I didn’t want to give the impression that we would never support this, if user demand is high enough, we’ll do what we can to meet those needs.
-
AuthorPosts