Debug Python the right way

Publicado em: 24 Abril 2026
no canal de: Cisco DevNet
357
18

Stop scattering print() statements to figure out what your code is doing. In this video, I debug a real Python error — a KeyError from inconsistent gNMI response data — using the VS Code debugger instead of print(). I walk through breakpoints, the variables panel, watch expressions, the debug console, conditional breakpoints, and logpoints, all while solving a real bug in a script that talks to an IOS-XR device on the free Cisco DevNet Always-On Sandbox.

🔗 Resources:
DevNet Always-On Sandbox (IOS-XR): https://devnetsandbox.cisco.com/DevNet/
Demo scripts (broken + fixed): https://github.com/jillesca/debug_pyt...
VS Code Debugging docs: https://code.visualstudio.com/docs/ed...
VS Code Python Debugging: https://code.visualstudio.com/docs/py...
uv (Python package manager): https://docs.astral.sh/uv/

#DeveloperProductivity #CiscoDevNet #NetworkAutomation #PythonDebugging

Table of Contents:

01:48 - Quick Setup
03:25 - Debugger Navigation
03:44 - Setting the breakpoint
06:19 - Watch Expressions
07:35 - The Debug Console — Exploring the Data
11:35 - Conditional Breakpoints
12:55 - Logpoints
14:04 - Recap


Nesta página do site você pode assistir ao vídeo on-line Debug Python the right way duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Cisco DevNet 24 Abril 2026, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 357 vezes e gostou 18 espectadores. Boa visualização!