Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Debugger on entity/form doesn't work...

(0) ShareShare
ReportReport
Posted on by 2

Hello, I have an entity that has a lot of web resources on it.  For some reason when I try to debug the form there is no scripts for me to look at/grab in the debugger.  Everything is just blank.  I can go to other forms in CRM 2016 and the debugger works fine.  Has anyone else run into this issue and if so, how do I fix it?  It is also the only entity/form that my cpu usage goes up when I click on new for a new record, not sure what is going on with this form, but it is strange and I need the debugger to work so that I can see what the issue is as my logic is working.  I don't get any errors on the screen itself, just doesn't work.

Please help....thank you.

*This post is locked for comments

  • USA80 Profile Picture
    USA80 2 on at
    RE: Debugger on entity/form doesn't work...

    I was able to get this working.  You both helped me, thank you.  The last piece was I had a section name in my script that wasn't the same name as the actual section name on the form.  Once I fixed that things worked great.

  • USA80 Profile Picture
    USA80 2 on at
    RE: Debugger on entity/form doesn't work...

    I also get the following error eventually...Unable to get property 'setVisible' of undefined or null reference.  I am not sure why this is happening.

  • USA80 Profile Picture
    USA80 2 on at
    RE: Debugger on entity/form doesn't work...

    I was able to get into the debugger now, but the only error that comes up in the console that says, "Out of memory".

  • Verified answer
    gdas Profile Picture
    gdas 50,089 on at
    RE: Debugger on entity/form doesn't work...

    Hi,

    As Aric mentioned when your debugger comes into  formtype   then you need to press F10 and the debugger will come to function LOB then you need to press F11 to enter into the LOB  function.

  • Verified answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Debugger on entity/form doesn't work...

    If it hits the debugger window, you are good.

    Just go one line at a time by using F10 (Step over) and F11 (Step into) commands.

    Step over will not go into the methods of the function

    Step into will go inside the called function.

    When you reach the LOBOnChange, press F11 to go through each line of code.

    You can also put breakpoints in your code to verify fucntionality.

    Hope this helps.

  • USA80 Profile Picture
    USA80 2 on at
    RE: Debugger on entity/form doesn't work...

    This didn't appear to work for me.  I have something like this:

    function LOBOnLoad()

    {

     debugger

     var formType = Xrm.Page.ui.getFormType();

    LOBOnChange();

    }

    where the LOBOnChange is calling the rest of the script which has the if statements/show hide logic.  When the form loaded it went to the debugger area and then I hit continue and now my from is stalled with no errors and just says loading.  The debugger isn't doing anything either, meaning, no errors, and I can't click continue.  

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Debugger on entity/form doesn't work...

    Hi,

    All you need to add in your code in the line debugger:

    function formLoad()

    {

      debugger

      var formType = Xrm.Page.ui.getFormType(); // Just an example

      // Rest of your code here

    }

    You will want to press F12 in your browser to open debugger window before loading this form, or just hit refresh (F5) to reload it.

    Hope this helps.

  • USA80 Profile Picture
    USA80 2 on at
    RE: Debugger on entity/form doesn't work...

    I am using IE, and in Chrome it seems to work for the debugger.  What would I put inside my code to add a debugger?  When in Chrome, it seems to run through my code just fine, so it is very strange.  With using web resources in a form, do you always have to save the form first and then refresh the screen to see that your logic is working?

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Debugger on entity/form doesn't work...

    To start, which browser are you using?

    Did you attempt to add "debugger" inside you code while the debugger window is open (F12)?

    That usually solves my problem when unable to debug.

    I have also experienced times where debugging did not work in Chrome but worked in IE.

    Check it out.

  • Suggested answer
    gdas Profile Picture
    gdas 50,089 on at
    RE: Debugger on entity/form doesn't work...

    Hi ,

    Step 1 :
    I am not sure about the issue, but I don't think this is related to memory or storage. This may be related to your browser settings ,Could you please check with another system.

    Step 2 :

    Download the fiddler and check all the requests see you are getting error or not.

    Step 3:
    This may be happen due to some script getting error and which blocked to load the other scripts . In this scenario you need to check following way-

    - What are the function registered in the form on load , try to disabled those function and open the forms.

    - Is there any document.ready you have used in the form , make them comment out until you could find the root cause.

    - Enable one on-load function by simply click from Form properties checkbox and refresh the form. When you reload the form make sure your browser script debugger should be enabled and open F12 window and check the console whether any script error you are getting or not and also check whether the web resource file associated to the function has loaded or not.

    - Do one by one for every function and test.


    I hope you will definitely get the root cause of your issue .

    Best of luck.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,407 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans