Salesforce Replay debugger
Salesforce Replay debugger
About
Salesforce Replay debugger is a debugging tool for the apex. It steps over apex code through debug logs. In this article, we will set up and use replay debugger in vscode.
perquisites Needed for replay debugger
- Salesforce CLI
- Salesforce extension pack for the visual studio code.
- Supported JAVA
STEPS
- Setup debug log in the system. In the debug logs make sure the Apex Code level debug level is Finest and the Visualforce page debug level is Finer.
- Note : For the Default SFDC_DevConsole debug level, Apex Code debug level is Finest and the Visualforce page debug level is Finer.
- Download debug logs in the visual studio Code. To download debug logs open command palette (Ctrl + Shift + P for windows, Cmd + Shift + P for mac). Then Select 'SFDX: GET Apex Debug Logs'.
List of recent Logs
4. On clicking the log, It will get downloaded on the system and will show up on the screen.
5. Now set up breakpoints on the apex code by left-clicking just left of the line number.
6. Now go to the debug log, Right-click and then select 'Launch Apex Replay debugger with
Current File'.
Current File'.
7. On clicking 'Launch Apex Replay debugger with Current File' a debugger menu will show up on the screen. Now click on play icon at the top.
8. On clicking play, debugger will stop at the line on which the breakpoint was set.
9. Click on step over icon (Marked with arrow to move to next).
Comments
Post a Comment