Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

how to debug JS in a pop up form

Posted on by 2,397

Hi, I have this scenario that I have javascript on form load event but it is pop up form, like task, appointment, developer tools doesn't show up. how do we debug then? thanks 

*This post is locked for comments

  • Verified answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: how to debug JS in a pop up form

    Does it have to be IE?

    If I have that kind of popup, this is what always works in Chrome:

    - Add debugger keyword to your script as already suggested above

    - Open that task window

    - Click F12 to open dev tools (apparently, too late for the "onload" at this point)

    - Then click F5 in the task window to reload it

    Since you already have dev tools open, the script will stop at the "debugger" line..

  • sdnd2000 Profile Picture
    sdnd2000 2,397 on at
    RE: how to debug JS in a pop up form

    Yes, I select the checkbox "manually choose the debugging engine",  but there is only VS option, no other options

  • sdnd2000 Profile Picture
    sdnd2000 2,397 on at
    RE: how to debug JS in a pop up form

    I tried to search my JS, but they are all system JS. I can debug it in VS

  • Verified answer
    prt33k Profile Picture
    prt33k 6,907 on at
    RE: how to debug JS in a pop up form

    Just select the checkbox fore "manually choose the debugging engine".. that should take you to JIT debugger for IE.

    Also I believe following are selected in IE settings:

    [X] Disable script debugging.

    [X] Disable script debugging (Other)

    [ ] Display notification about a script error

    [ ] Show friendly HTTP error message

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: how to debug JS in a pop up form

    You don't have to add the debugger keyword if you want to debug this in Internet Explorer.

    When the new pop-up window that you need to debug opens up, click F12 on your keyboard, and from the debugger tab, click on the folder icon with a  dropdown arrow to add the name of the JavaScript file.

    Type the prefix of you JavaScript file and it will show up in the list. Click on the script file to select it.

    If the function that you are trying to debug in in the form load event, set a breakpoint, and close the form. When you reopen it in the nexttime, the breakpoint will hit.

  • Verified answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: how to debug JS in a pop up form

    Hi,

    You should be able to debug it in VS. If you want IE then try this-

    Once your pop-up is loaded, select the popup and click F12 and then search for your library with name. This will load the libraries for the pop ups as well

    Hope this helps.

  • sdnd2000 Profile Picture
    sdnd2000 2,397 on at
    RE: how to debug JS in a pop up form

    Found it. but it still asked for VS to debug, not IE

    5040.2017_2D00_08_2D00_04_5F00_1548.png

  • sdnd2000 Profile Picture
    sdnd2000 2,397 on at
    RE: how to debug JS in a pop up form

    I did add debug keyword. but where is the option to enable debug in IE?

  • Suggested answer
    prt33k Profile Picture
    prt33k 6,907 on at
    RE: how to debug JS in a pop up form

    if you add 'debugger' keyword in your javascript then the script will break and you can debug it.

    Please ensure the option to enabling debug is checked in IE. (if u r using IE)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans