See how breakpoints can be created that only pause program execution when a certain logical condition is met.
- [Instructor] The VS Code Python extension also supports … conditional breakpoints, which are breakpoints … that trigger when specific conditions are met. … So one of the down sides when using regular breakpoints … when you're debugging is that they always cause … program execution to stop when they're hit, … but that's not always the behavior that you want. … Sometimes, you only want a breakpoint to trigger … when a particular condition is triggered. … So for example, sometimes a bug only occurs … when a certain file is open, … or sometimes the problem only happens … when certain parameter values are … above a certain threshold in a function, … and you don't want the breakpoint to trigger … unless those conditions are present. … So we're going to use conditional breakpoints … to achieve this. … What I'm going to do is, in our chapter three lesson four, … going to open up the code for the geometry solver, … and this time I'm going to set a conditional breakpoint … in the same place we did last time, …
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: Conditional breakpoints