VS Code调试Python 发表于 2025-01-20 分类于 技术 VS Code调试Python配置调试 安装Python扩展 点击调试图标 → 创建launch.json 配置调试器 launch.json123456789101112{ "version": "0.2.0", "configurations": [ { "name": "Python: Current File", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal" } ]} 调试技巧 断点:在行号左侧点击 调试控制台:查看变量 条件断点:右键设置条件 总结VS Code是Python开发的利器。