Learn how to use an alternative to breakpoints that log important program information instead of stopping program execution.
- [Instructor] One more helpful debugging feature … to look at is log points. … So log points are similar to breakpoints, … in that they help you see what's happening … in a program during execution. … But they don't actually pause the program itself. … Log points are helpful for logging useful information … to the console while debugging apps that are running … on production servers that cannot be paused or stopped. … Setting a log point is essentially the same … as setting a breakpoint. … So let's go ahead and open up our geometry solver example … and what I'm going to do here is scroll down … to the area of a circle method and I will right click … in the gutter next to the line that calculates the area … and I will choose add log point. … So then I'll enter a string that will be logged … to the output when this log point is hit. … So I can also use curly braces to enter expressions … that will be evaluated. … So in this case, I'll just log the value of the parameter. … So I'll just write parameters and that's going to be R …
Released
5/13/2019- Constructing a simple Python program in VS Code
- Editing, formatting, and refactoring Python code
- Debugging Python code
- Setting breakpoints
- Using Python docstring
- Creating better comments for your source code
- Using the REST Client extension
Share this video
Embed this video
Video: Logpoints