Generate and View Apex Debug Logs
Apex debug logs can record database operations, system processes, and errors that occur when executing a transaction or running unit tests in any authenticated org. Enable the Debug Log in Salesforce Extensions for VS Code, then view the logs with VS Code or Salesforce CLI.
-
In Salesforce Extensions for VS Code, prepare the org to generate logs and configure the debugger.
-
Log in to the org.
-
For Replay Debugger, run SFDX: Turn on Apex Debug Log for Replay Debugger.
-
Create a launch configuration file for Replay Debugger or Interactive Debugger.
-
-
After you run the tests, get a list of the debug logs.
-
View a debug log by passing its ID to the
apex get logcommand.
See Also