Debugging and hitting break points

The Welkin Suite Forum

Debugging and hitting break points



Debugging and hitting break points

  • Please log in to reply

#1
windows version welkinsuite

derricke

    Posted 05 Jan 2018 and edited 27 Jun 2018

    I am fairly new to TWS but what got me to use TWS is the ability to hit break points and walk through code.  However,  I am having trouble hitting the break point which I need to hit. I find that it puts me on a line in my class that I didnt even set a break point at. What I am currently experiencing is I am calling an instance of my class and putting a break point on the first line of the method I am invoking.  It accepts the break point but when I start debugging now the break point says it can be hit and it stops on a line which I did not have  a break point on.  If you can advise if I am not using it correctly because I am having trouble with debug anon apex. 

    Thank you


    Derrick




    7 replies to this topic

    #2

    vlgubanovich

      Posted 08 Jan 2018

      Hi Derrick,


      Thank you for your question.

      The behavior that you are describing might be related to the 2MB log file limitation in Salesforce - if you're trying to debug a large part of logic that generates more than 2MB of logs, Salesforce will truncate the log file thus you won't be able to debug the later stages of the execution flow. 

      Can I please ask you to check if you can find the corresponding log entries (to the line of code that you are debugging) in your log file? And just to double-check and ensure - can you please confirm that the line of code where you have a breakpoint is 100% hit in the session that you're debugging?


      In case if the 2MB limitation is the reason in your situation - the only solution is to try debugging smaller parts of your logic. You can debug smaller parts using Anonymous Apex, for example.


      Looking forward hearing back from you.


      Best Regards,

      Vladimir


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


      #3

      derricke

        Posted 10 Jan 2018

        Thanks Vladimir.  It was the 2MB log file limitation. I will just use the anon apex when possible. Thank you for the explanation.


        Derrick



        #4

        vlgubanovich

          Posted 12 Jan 2018

          Hi Derrick,


          Thank you for getting back with the update - I'm happy that the Debugger works for you that way.


          Please feel free to let us know if you'll have any other questions or ideas :)


          Best Regards,

          Vladimir


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


          #5

          adamdryit

            Posted 25 Jun 2018

            Hi

            How do I actually go about having one of my breakpoints stop the code execution?

            I've tried putting a breakpoint in a Unit Test and also in Anonymous Apex - the breakpoint appears to do nothing on both occassions...

            Thanks

            Adam


            Windows 10


            #6

            kate.dulko

              Posted 26 Jun 2018

              Hi Adam,


              Thank you for your question.


              Since this is a Retrospective Debugger, all the debugging actions are performed already after an execution that was performed previously on Salesforce. You can see that when you start debugging, for example, a unit test, the IDE run it, get a test result, and start the debugging after this.

              This is why any of breakpoints couldn't affect an execution process and cannot abort it.

              After running a debugging process, you can use your breakpoints to track the execution process that was already run.


              You can find all the information about using breakpoints for you debugging process in the IDE and about the debugging process itself here and here.


              Hope this would help.


              Regards,

              Kate



              Kate Dulko
              Customer Relations

              The Welkin Suite

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

               

                


              #7

              adamdryit

                Posted 26 Jun 2018

                Thanks Kate!

                As constructive critisism I found this confusing:

                "Set the breakpoint next to the string that you want to explore in more detail"

                When it says "string" it means "line of code" right?


                Also if this article started by showing how to kick off debugging a unit test or anon apex I think it would help readers as they can try it out really quickly. For me it wasn't obvious how to kick debugging off.

                Anyway, I've figured it out now and it's a great feature!

                Thanks
                Adam


                Windows 10


                #8

                kate.dulko

                  Posted 27 Jun 2018

                  Hi Adam,


                  Thank you for your response and I'm happy to hear that you like the Debugger functionality!

                  Also, thank you for sharing your confusions - we will take them into account and will be happy to make the documentation more clear and convenient for exploring the IDE.


                  Have a nice day!


                  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