Every time I use the VSCode command to turn on the Apex Replay Debugger, it expires in less than an hour, and then I have to re-run the command to turn it back on again. Is there a way to turn it on for the entire day or just permanently? Thanks🍻
2 Answers
Not permanently, as it depends on TraceFlag, which allows a maximum of 24 hours. You could go in to Setup after enabling to extend the session (see Setup > Monitoring > Debug Logs), but keep in mind the reason why it's short to begin with is because you have a maximum storage for debug logs. Once you exceed this limit, the flag would be disabled anyways until you reduce your storage usage (you can read more about that in this excellent answer). It's probably best to turn it on when you need it, and turn it off again when you don't. Cleaning up debug logs that you never meant to create is a waste of your time.
-
thanks for all the additional tips and gotchas you've mentioned. I appreciate it!!– Bahman.ACommented Jun 24, 2021 at 21:25
If you use VsCode SFDX Hardis extension, activate debug logs will be automatically run when:
- you open a SFDX project in VsCode containing breakpoints
- you define a breakpoint
More info in this article