The Welkin Suite Forum

retrospective debugger not working



retrospective debugger not working

  • Please log in to reply

#1
windows version welkinsuite

dave

    Posted 03 Jan 2019 and edited 12 Mar 2021

    The debugger is, IMO, one of the most useful features of TWS but it seems to be working less and less for me. Lately, it seems like I'm lucky to have the debugger work 10% of the time. Very frustrating.


    Most times, I try to start debugging - from a unit test or from a debug log - and it just stops like the transaction has finished, even though I know it's at the start of a very long log. That or the debugger doesn't really start - the windows for locals/call stack/etc show up and the title bar changes to says"running" but there's nothing on the stack and the buttons for step in/out/etc are not there. The only way out of this (that I can find) is to restart TWS.


    This seems to happen when there are managed packages present but I'm not 100% sure on that. If there is something I can do to help TWS figure this out, please let me know. 



    7 replies to this topic

    #2

    kate.dulko

      Posted 21 Jan 2019

      Hi Dave,


      Thank you for your post and please sorry for the delay in our response.


      We are aware of some issues in the debug functionality and we are going to work on it during the nearest months - we are going to work on our debugger and improve its work since there were a lot of changes on log files from Salesforce side and this influenced to the debug functionality in the IDE.

      Also, there can be some specific contexts which are not handled in the IDE and we are going to solve this too.


      At the same time, regarding managed packages, I should note that, in most cases, the IDE doesn't have access to code from managed packages and this is why there is no ability to include managed packages to a debug process.


      Regards,

      Kate


      Kate Dulko
      Customer Relations

      The Welkin Suite

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

       

        


      #3

      dave

        Posted 22 Jan 2019

        Thanks, Kate. The debugger really is the #1 TWS feature for me - it would be great to see it happy again. 


        On my mention of managed packages, I just meant that debugger failures seem to occur more often if there are managed package entries in the log.



        #4

        kate.dulko

          Posted 22 Jan 2019

          Hi Dave,


          Thank you for your response and for the clarifying this detail.

          We will take this into account when working on issues related to the debug functionality.


          If you have any additional questions, details, or suggestions, please feel free to let us know - they are always useful for us to make the IDE's functionality better.


          Have a nice day!


          Best Regards,

          Kate


          Kate Dulko
          Customer Relations

          The Welkin Suite

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

           

            


          #5

          dave

            Posted 16 May 2019

            As an update to this, I believe the problem is caused beause of a managed package we have to control order-of-execution and such of triggers. In this particular case, it's https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000EJftXUAT but I think it's probably an issue with any code that works this way.

            The package has some CMDT records created by the user which tells it which classses need to be executed and in which order. There's code in the package that takes these string values and dynamically looks up the users apex class (using Type.forName(), I think), casts that to some known package-defined interface and invokes it.

            I think this results in a debug log that goes something like:

            • enter/exit user stuff
            • enter/exit user stuff
            • enter/exit user stuff
            • enter managed package
            • enter user stuff
            • exit user stuff
            • exit managed package
            • enter/exit user stuff
            • enter/exit user stuff

            TWS seems to have problems when it exits the part in the middle. The debug session ends instead of going back to stepping through the remaining user code.



            #6

            kylev

              Posted 17 Feb 2021

              dave, on 16 May 2019 - 03:36 PM, said:

              As an update to this, I believe the problem is caused beause of a managed package we have to control order-of-execution and such of triggers. In this particular case, it's https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000EJftXUAT but I think it's probably an issue with any code that works this way.

              The package has some CMDT records created by the user which tells it which classses need to be executed and in which order. There's code in the package that takes these string values and dynamically looks up the users apex class (using Type.forName(), I think), casts that to some known package-defined interface and invokes it.

              I think this results in a debug log that goes something like:

              • enter/exit user stuff
              • enter/exit user stuff
              • enter/exit user stuff
              • enter managed package
              • enter user stuff
              • exit user stuff
              • exit managed package
              • enter/exit user stuff
              • enter/exit user stuff

              TWS seems to have problems when it exits the part in the middle. The debug session ends instead of going back to stepping through the remaining user code.

               Any update on this?



              #7

              dave

                Posted 26 Feb 2021

                No - sorry.. I did try to repro the problem in a DE but couldn't make it happen. I know it definitely still happens, though - just don't know why.



                #8

                gtasker

                  Posted 12 Mar 2021

                  Mentioning that the new Windows version of TWS did not resolve the retroactive debugging from a log file.

                  I am seeing this error in the TWS log file:
                  2021/03/12 06:14:35.251 [ERROR] [11] System.NullReferenceException: Object reference not set to an instance of an object.
                  at WelkinSuite.ProjectModel.SalesforceProjectExtensions.GetApexFileFullPathById(ISalesforceProject project, String itemId)
                  at WelkinSuite.ApexLogAnalyzer.Implementation.ApexLogAnalyzer.GetFileIdsWithFilePathes(ISalesforceProject project, IEnumerable`1 logEntries, ExecutionContext executionContext)
                  at WelkinSuite.ApexLogAnalyzer.Implementation.ApexLogAnalyzer.GetBasicEntriesTree(ISalesforceProject project, IReadOnlyCollection`1 logEntries, ExecutionContext executionContext)
                  at WelkinSuite.Application.DebugSimulationEngine.Implementation.SimulationEngine.CreateSimulationData(ISalesforceProject project, DebugExecutionContext debugExecutionContext)
                  System.NullReferenceException: Object reference not set to an instance of an object.
                  at WelkinSuite.ProjectModel.SalesforceProjectExtensions.GetApexFileFullPathById(ISalesforceProject project, String itemId)
                  at WelkinSuite.ApexLogAnalyzer.Implementation.ApexLogAnalyzer.GetFileIdsWithFilePathes(ISalesforceProject project, IEnumerable`1 logEntries, ExecutionContext executionContext)
                  at WelkinSuite.ApexLogAnalyzer.Implementation.ApexLogAnalyzer.GetBasicEntriesTree(ISalesforceProject project, IReadOnlyCollection`1 logEntries, ExecutionContext executionContext)
                  at WelkinSuite.Application.DebugSimulationEngine.Implementation.SimulationEngine.CreateSimulationData(ISalesforceProject project, DebugExecutionContext debugExecutionContext)






                  Boost Your Productivity. Get Started Today

                  Try Free Trial