The Welkin Suite Forum

Unable to debug a single method



Unable to debug a single method

  • Please log in to reply

#1
windows version welkinsuite

jrhoades

    Posted 21 Aug 2017

    Hello guys,


    I am having a very interesting issue. I am having a problem with some code I have typed up, according to code coverage I am having problems somewhere near a SOQL statement I have. When I try to debug the code the debugger skips the method where the SOQL statement is. Side problem that may be related or may be separate is when I try to use breakpoints some are stating invalid location where the code does work for sure and for some reason the debugger ignores the last one even though it states that it's valid.



    5 replies to this topic

    #2

    vlgubanovich

      Posted 21 Aug 2017

      Hi jrhoades,

      Thank you for letting us know about this issue. May I please clarify some more details:

      • What version of TWS are you using? Is it the latest version?
      • The lines which are skipped by the IDE - is that code deployed in the org?
      • How exactly do you start the debugging process - unit tests/anonymous apex/from the log file? In case if it is a log file - the code that is skipped by the IDE was present on the org when the log file was generated?
      • In the debug mode - does the IDE just skip your method or stops debugging right before the method call? If it stops debuggin - please check if your log file is 2MB and if it is stripped by Salesforce?
      • Can you please check the log file (that's used by the IDE for debugging) manually - if there's a METHOD_ENTRY item for your method present in it?

      Regarding the invalid location for breakpoints - the IDE renders following state for the breakpoint in case if that line of code is out of scope of the debugger - either it was not called during the session that is being debugged or the log file was stripped by Salesforce due to the 2MB limit.


      Looking forward hearing back from you.

      Thank you,

      Vladimir


      Vladimir Gubanovich
      Head of Product
       
      The Welkin Suite
      skype id: vladimir.gubanovich
      e-mail: vladimir.gubanovich@welkinsuite.com


      #3

      jrhoades

        Posted 21 Aug 2017

        Hey Vladimir,


        Thanks for the quick response. As far as your questions

        • latest version of TWS
        • Yes the code has been deployed
        • I have tried in all the methods you described.
        • Skips the method and none of the log files I have made are above 1MB let alone 2MB.
        • I just checked the latest one and there is not an item but there isn't one for the method I can run the debugger on.

        I hope that gives you some insight into my issue. I have solved my programs problem so all the details I have given above are based on the code working as expected.




        #4

        vlgubanovich

          Posted 22 Aug 2017

          Hi jrhoades,

          Thank you for providing the details. We will investigate the issue and I'll get back to you as soon as we have any updates, as there's no quick answer from us at the moment.

          Also it seems that we'll need to ask you to send us a log file please (using the "Help -> Report a bug" option from the IDE's main menu), so we'll see if there were any errors when parsing a debug log.

          Thank you,

          Vladimir


          Vladimir Gubanovich
          Head of Product
           
          The Welkin Suite
          skype id: vladimir.gubanovich
          e-mail: vladimir.gubanovich@welkinsuite.com


          #5

          jrhoades

            Posted 22 Aug 2017

            Just submitted the log files. I hope that this is a simple fix.


            Thank you,

            Justin Rhoades



            #6

            vlgubanovich

              Posted 25 Aug 2017

              Hi Justin,

              Thank you for providing additional details.

              From what we see right now there might be some situations when we are unable to properly reconstruct the execution flow using the information from the log files. This can happen due to a couple different reasons:

              • Salesforce might have silently changed something in the logs behavior
              • There might be something rare and not-common in terms of your code or execution flow, that we are not handling properly
              • There might be some edge-case scenarios when information from debug logs is just plain not sufficient, to reconstruct the flow (for example if your method consists of only one SOQL query, Salesforce does not track method entry and exit in the log file properly)

              Taking this into account, there's no option for us, other than asking you to send us a Debug Log file that you're trying to debug. As we completely understand that there might be some kind of sensitive information that you don't want to share (and we don't want to have access to) - if it is suitable for you, please ensure that there's no real data from your org included in the log file, that there's no classes/methods/objects/fields/properties names that you don't want us to see. If there's any kind of such data - we'd kindly ask you to "mask" it in the log file (replace with something similar in terms of data format), so the structure of the log file won't be damaged.

              Having this file we should be able to find out any unknown for us situations and will add their support in one of the next releases.

              If you're ok to send us the log file - please send it to the info@welkinsuite.com so it won't be publicly available.


              Thank you,

              Vladimir


              Vladimir Gubanovich
              Head of Product
               
              The Welkin Suite
              skype id: vladimir.gubanovich
              e-mail: vladimir.gubanovich@welkinsuite.com





              Boost Your Productivity. Get Started Today

              Try Free Trial