Debug Salesforce

  • Please log in to reply



    Posted 06 Sep 2016

    Would you be kind enough to explain your debug capabilities in a little greater detail?

    In particular, would you explain the 'preliminary' steps required.   Your various topics indicte:

       1. debug can happen from Salesforce Logs.   However, your illustrations use a file of type '.sflog', while the standard Salesforce Log is of a type '.log'.   Are these the same and just renamed, or do the '.sflog' come from the new (horrendously expensive) Salesforce debugger?

       2. You also mention 'debug from unit tests.   These appear to be different from the standard Salesforce test classes, but there is no further definition of these.   If they are not standard Salesforce test classes, then how are they created?

    3 replies to this topic



      Posted 06 Sep 2016

      An additional question.  In the 'Logs' windows in your IDE.   Where are these logs saved?   And shouldn't it be possible to start the debugger from one of these logs?



        Posted 06 Sep 2016

        Hi mlochiano,

        Thank you for your questions. I'll try to explain how this works in details.

        First of all I'd like to highlight that The Welkin Suite's Retrospective Debugger is not related in any way to the Salesforce's own Apex Interactive Debugger.

        .sflogs files are regular Salesforce Logs which TWS downloads and saves with *.sflog extension (we're not using *.log extension as it is too generic and used by thousands of different applications for hundreds of different log types).

        In the "Logs" panel in The Welkin Suite you see the list of Salesforce logs which are available for you to download, but they are not downloaded until you double-click on any of them. After you double-click on any of the logs files TWS will download it and save it in the Logs folder in your project folder.

        And now we're close to the Retrospective Debugger.

        In general how this works:

        1. Somehow (we will get to this later) TWS receives a log file with proper debug levels set (we need FINEST log level for "Apex Code" and "System" as well as INFO for "Database")
        2. TWS retrospectively rebuilds an execution flow based on the log file analysis
        3. TWS provides you options to go through this execution flow simulating normal debugging

        So in case if you have a log file with correct log levels (either you've downloaded it from the Salesforce UI or it was sent to you by customers/teammates or it was downloaded using TWS itself) - you can start debugging from a log file.

        In case if you don't yet have a log file but you still want to debug some part of your code you can do this in 2 ways - debug unit test or debug anonymous apex.

        In both cases the process which TWS does after you press "debug unit test" or "debug anonymous apex" is:

        1. sets current logging settings to fit our debug levels needs
        2. executes selected unit test or anonymous apex script
        3. waits until execution end
        4. downloads generated log file
        5. sets back your logging settings which were configured before the debug

        And after that normal debug process starts.

        So all this means that you can just create a regular unit test method (or anonymous apex script) which will call something in your code which you want to debug, or you can debug any of your existing unit test methods.

        In general - there is nothing special needed from you or on your organization to start using TWS's Retrospective Debugger.

        You can also take a look at our release notes post about the debugger or watch the webinar recording about the retrospective debugger - there might be some helpful info.

        Please let me know if this helps and answers your question.



        Vladimir Gubanovich
        Head of Product
        The Welkin Suite
        skype id: vladimir.gubanovich



          Posted 06 Sep 2016

          Thank you.  This quite helpful, and actually would completely justify the price for the entire application.

          Boost Your Productivity. Get Started Today

          Try Free Trial