facebook

Javascript debugger with new M2 release

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #243269 Reply

    Kamal
    Member

    Hi,
    I tried using javascript debugger with new M2 release. I set the breakpoints in .js file and in jsp file with in the <script> tags , but the debugger never stops at breakpoints.
    I went thru the documentation section but still no luck.

    I have created my project using MyEclipse–>J2EE Project –> Enterprise Application Project project wizard and doing hot swap and doing exploded archive of ear file in jboss server.

    Thanks

    #243279

    Kapil Kapre
    Member

    kamalmn,
    Could you detail the steps you took to launch the JS debugger? Also try setting the breakpoints *inside* the method body instead of on the signature.

    #243285

    Scott Anderson
    Participant

    Kamalamn,

    Please note that for javascript debugging to work you need to be on Windows (in this release, other OS’s coming soon) and you must access the file using the Javascript debugging launch configuration at Debug As… > JavaScript Application, setting the URL to the HTTP ref of the page you’re debugging on your server. You can see a screenshot of how to configure this in the New & Noteworthy doc, but you need to scroll down to the section labeled “Configuring a JavaScript Launch Profile”.

    #243296

    Kamal
    Member

    well, i’m using OS win xp pro and the way i configured javascript debugger is by clicking on Run–>Debug..–>and in the JavaScript Application Section Entering the name of the file to debug (searchpanel.js), Name of the project (XYZWeb) and lunch url is file:/c:/workspace/XYZWeb/WebRoot/pages/javascript/searchpanel.js. I placed break points all over the places like, with in the function ,on the function and variables…etc

    But still no luck !

    #243315

    Scott Anderson
    Participant

    Is anything calling the javascript file? You might want to set your breakpoints in it but then launch an HTML file that uses the javascript functions in the file. You can do that easily by opening the HTML file in our editor and right clicking in the left margin and selecting ‘Debug As… > Javascript Application’. Then, when the browser opens your HTML page and you interact with it such that the javascript is called, the breakpoints should be hit.

    #243319

    support-jed
    Keymaster

    kamalmn, I noticed you are running the .js file directly. Does this .js file have code at the script level (that is, not in a function) that initiates calls into the function you are trying to debug?

    If an HTML or JSP file makes the initial call I would try debugging that file. Hope this helps!

    #243338

    Kamal
    Member

    Even thou i tried calling javascript function from jsp it is not working.

    1. placed break point on <body onLoad=”initPage()”> in .jsp page ( Working) breaking @ this place
    2. Placed break point on ,in initPage() javascript function in the same page (Not working) not breaking @ this point
    3. Used debug as JavaScript function on .jsp page (Not working)

    #243358

    Greg
    Member

    Currently inline JavaScript in JSP pages doesn’t work in the debugger. We are going to address that before 4.1 final. For now to get JS debugging to work in JSPs just use external javascript. Put all your JavaScript in .js files and then reference them using src=”” attr in your script tags. Then you can set breakpoints in these .js source files and the debugger will stop.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Javascript debugger with new M2 release

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