When I'm running an app in debug mode with Visual Studio, is there a way that I can find out what line of code is currently being processed? By this I mean, is there a tool that works kind of like setting a breakpoint, but you don't have to set a breakpoint - you can just find out at any point in time what line of code is being executed?
The reason for this, is that sometimes you may want to debug intermittent hangs in your app. If your running in debug mode, and your app hangs, it would be useful to immediately find out what line of code it last processed, without having to plan ahead by setting breakpoints or trace calls.
Click the Debug | Step Into menu item or press the F11 key to step into any property or method for debugging. You can then continue the line by line execution by pressing F10 or continue ...
You can step through the code in a number of different methods, you can step through line by line using F11, step over using F10 or step out using (Shift+F11). Step Through: Each and every line of code executed will be debugged.
To run or debug a simple app in VS Code, select Run and Debug on the Debug start view or press F5 and VS Code will try to run your currently active file. However, for most debugging scenarios, creating a launch configuration file is beneficial because it allows you to configure and save debugging setup details.
You can find other debug logs you've downloaded with Visual Studio Code in the . sfdx/tools/debug/logs folder. Right-click any line in the debug log, then choose SFDX: Launch Apex Replay Debugger with Current File.
Press the Pause Button ("||").
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With