The Welkin Suite Forum

Debugger starts on line 759 of the debug log



Debugger starts on line 759 of the debug log

  • Please log in to reply

#1
windows version welkinsuite

bcibm2018

    Posted 22 Feb 2018 and edited 01 Mar 2018

    I am new to Salesforce and totally TWS is totally awesome...so my apologies if I am missing something

    I run the following Apex to fire a before/insert trigger on Account

    Account acct = new Account(Name='Test Account14', BillingCountry ='United States');
    insert acct;

    and the first line of source the debug session starts showing is a country class file line 63 that is on line 759 of debug log( a beginning FOR statement inside a method!), totally stepping over the trigger code and handler class that calls this... I can Step-back in the debug log which goes back to line 3, but the source code only shows the FOR line 63 of the country class file.

    For another test if I execute 

    Account acct = new Account(Name='Test Account14');
    insert acct;

    the trigger and handler class show in the debug session and the stepping behaves as expected.

    What could be causing the difference?



    2 replies to this topic

    #2

    kate.dulko

      Posted 23 Feb 2018 and edited 23 Feb 2018

      Greetings,


      Thank you for your feedback and for contacting us with this question!


      It really seems that there's something strange happens in this case. Sometimes there might be some strange records (records that do not follow rules from the debug logs format description) in the debug logs and this is why the IDE might fail to reconstruct a whole execution flow correctly. Also, there might be something that the IDE just do not handle properly (however, the number of such cases rapidly is going closer and closer to zero over the time).


      May I please ask you to check one thing for this case:

           1. when you start debugging your code where the issue, right after a debug starts please navigate to the Main Menu -> Debug -> Show Debug Logs;

           2. this will open the panel that will show you debug log entries that were parsed as a part of the previous step;

           3. in the case, when debugging starts on a strange part of the code as you describe - what do you see in the Deubg Logs panel?
               Do you see there all first 759 lines of log file?

           4. if the number of entries shown in the Debug Logs panel is significantly less (compared to the line from what the IDE starts debugging), can you please check the log file and let us know what's located in a couple lines before the lines that you see in the Debug Logs panel?


      Additionally, in order for us to resolve the issue, this would be very helpful and we would greatly appreciate if you could share with us your Debug Log file where this issue is reproduced. 
      In the case, if this is acceptable for you – please ensure that there is no any confidential information or sensitive information (data records, certain classes or method names, SOQL queries which contain some valuable information, etc.). If such information is present in the file, please replace it with some tag, for example, *hidden info*, however, don't remove it at all - the file structure is very important for an ability to analyze the file properly.
       
       
      Looking forward to your response.
       
      Thank you,
      Kate

      Kate Dulko
      Customer Relations

      The Welkin Suite

      twitter: @KateDulko
      skype id: d_katerina
      e-mail: kate.dulko@welkinsuite.com

       

        


      #3

      kate.dulko

        Posted 01 Mar 2018

        Hi Blair,

        Thank you for all the provided information and additional details.


        According to your log file, the IDE does not have any information about what happened below the line #759 in your log file. You can check the line #757 (*** Skipped 499569 bytes of detailed log) - this means that about 25% of the details are not present in the file due to the 2MB limitation from Salesforce.


        If we'd go deeper and try to understand what exactly was removed:
             - If you'd check the line before the line #756 you'll notice that there are only method_entry&exit, constructor_entry&exit entries
             - Method_Entry, Method_Exit, Constructor_Entry, Constructor_Exit are not "debuggable" lines, as they do not provide any information on what was executed (e.g. you can check the Statement_Execute entries for example of a normal "debuggable" entries)
             - According to the truncated part of the log file, absolutely no actions have happened between entering and exiting those methods, this is why the IDE is not going through that lines.


        So taking into account the way how Salesforce truncated your log file, there is no information for the IDE to go through anything that happened before the line #759 in your log file.
        The only good way for you at the moment to debug the logic is to reduce the scope of debugging. For example, please try debugging the same code with a smaller set of records, thus there will be much less repetitive information in logs.


        Hope this helps.

        Best Regards,
        Kate


        Kate Dulko
        Customer Relations

        The Welkin Suite

        twitter: @KateDulko
        skype id: d_katerina
        e-mail: kate.dulko@welkinsuite.com

         

          





        Boost Your Productivity. Get Started Today

        Try Free Trial