facebook

Debug Javascript in jsp

  1. MyEclipse Archived
  2.  > 
  3. Web 2.0 / AJAX
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #250497 Reply

    kulkarni_ash
    Member

    Hi
    I have a lot of javascript in JSP head section
    can i debug it in myeclipseide??
    if yes how, if no are you planning in adding this support?

    Also javascript in head section of my jsp is not formatted, when i do
    document – format – document

    but it works in js file, is this a bug??

    Ashish

    #250565 Reply

    Riyad Kalla
    Member

    Ashish,
    Try and debug your JS in the head of your file, I believe it works for most cases. If it doesn’t work, you can just break that code out into it’s own separate .js file.

    As far as the formatting goes, it should improve moving forward, but may not be available right now due to the complexity of the JSP formatter already.

    #250594 Reply

    Riyad Kalla
    Member

    Ashish,
    I just got clarification from the dev team that debugging of JS inside of JSP files is not supported, you will need to break it out into a separate JS file for now. We should be addressing this soon.

    #251127 Reply

    daolwin
    Member

    But even by putting them in a separate JS file (as it’s the case for me at the moment), it’s still not possible to debug them from the JSP file.

    D.

    #251158 Reply

    Riyad Kalla
    Member

    Are you using a standard or professional subscription? Javascript debugging is only in the Pro version (or trial if it’s still below the 30 days)

    #251670 Reply

    Smitha
    Member

    I have Professional subscription of Myeclipse 4.1 and am not able to debug Javascript even if the javascript is in a separate file.

    I have Myeclipse set up for remote debugging and am not able to debug Javascript when I run my app.

    Smitha

    #251671 Reply

    Riyad Kalla
    Member

    Smitha,
    Are you sure you are following the very specific steps to debug your JavaScript:
    http://www.myeclipseide.com/images/tutorials/quickstarts/javascript/

    It’s not like JSP debugging, you can’t just run the page in your browser, you have to use our special Web 2.0 Browser that is part of MyEclipse now, all the details are in the link above.

    #251782 Reply

    Smitha
    Member

    I am following the specific steps that are specified in the quickstart.

    I have a login.jsp and loginCheck.js files in my struts app.
    I have added some breakpoints in my.js file and when I debug the app using Web2.0 browser, I dont see the app stopping at the breakpoints and so am not able to step through.

    Am I missing something.

    I tried to debug a simple struts app, I am able to do it, but with my app, it doesnt work. Are there any restrictions?

    Smitha

    #251783 Reply

    Riyad Kalla
    Member

    Smitha,
    That sounds right. Setting the breakpoint in the JS file, then right click on the JS and select “Debug As > JavaScript APplication” and enter in a Launch URL pointing at the login.jsp page, then click or do something to cause the JS to get executed.

    Is this a project you can send to me and tell me what you are trying to specifically debug? If so, please email it to support@genuitec.com ATTN Riyad with a link to this thread so I know why I’m getting the file. (You can use File > Export > To Archive to export the project to a ZIP)

    #251789 Reply

    Riyad Kalla
    Member

    I owe you an appologize, I had a massive crossing of my wires. JS debugging in JSP files is not supported yet, but we have plans to have it in 5.0. I was in such a 5.0 mindset that I hadn’t realized the discrepency here. I’m sorry for the inconvenience, we realize this is really a show stopper for a lot of people and hope to address it soon.

    #251826 Reply

    Smitha
    Member

    I have tried to debugJavascript with a sample struts app that I found in one of the forums and I was able to get it working.But when I apply the same to my app, it doesnt work.

    The javascript debugging also works for simple html files.

    Is it supported only for simple apps.

    I got the sample struts app from the following link and when I debug it, I was able to get it working.

    http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-10801.html

    Smitha

    #274652 Reply

    John-N
    Member

    Riyad,

    I’m having a similar problem with 6.0 M1. I’m trying to debug a separate .js file that is being included into a JSP page in a J2EE application.

    The javascript editor allows me to set a breakpoint, but when I get there the debugger does not stop.

    I tried both with an external browser, and the Web Browser view in MyEclipse.

    Does this have something to do with keeping the JSP source around?

    Thanks

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: Debug Javascript in jsp

You must be logged in to post in the forum log in