web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

how to debug JS in a pop up form

(0) ShareShare
ReportReport
Posted on by 2,510

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

I have the same question (0)
  • Suggested answer
    prt33k Profile Picture
    6,907 on at

    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)

  • sdnd2000 Profile Picture
    2,510 on at

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

  • sdnd2000 Profile Picture
    2,510 on at

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

    5040.2017_2D00_08_2D00_04_5F00_1548.png

  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    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.

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    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
    prt33k Profile Picture
    6,907 on at

    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

  • sdnd2000 Profile Picture
    2,510 on at

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

  • sdnd2000 Profile Picture
    2,510 on at

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

  • Verified answer
    ashlega Profile Picture
    34,477 on at

    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..

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans