惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
GbyAI
GbyAI
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
月光博客
月光博客
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
腾讯CDC
博客园 - Franky
Engineering at Meta
Engineering at Meta
C
Check Point Blog
T
The Blog of Author Tim Ferriss
有赞技术团队
有赞技术团队
Microsoft Azure Blog
Microsoft Azure Blog
MyScale Blog
MyScale Blog
I
InfoQ
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
N
Netflix TechBlog - Medium
Last Week in AI
Last Week in AI
S
SegmentFault 最新的问题
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
WordPress大学
WordPress大学

博客园 - bregman

codexapp不能显示数学公式问题 统计用户使用目录 intel mac 安装 最新版torch node安装 使用Codex问题 测评数据集和大模型报告 litellm 使用介绍 容器中pytorch的cpu速度很慢,原因找到了 KL 散度 podman 替代docker 【代码片段】key-value格式解析 安装 flash-attention windows通过ssh去连接Linux服务器 大模型课件 CSE 234: Data Systems for Machine Learning 大模型训练ultrascale-playbook bash脚本片段 mac 下镜像使用 使用大模型 调用本地大模型 语言模型资料 快手MARM 文章理解 【脚本片段】cat中防止变量替换
使用Python内置的 pdb 模块 debug
bregman · 2024-12-29 · via 博客园 - bregman
  1. 使用Python内置的 pdb 模块
  • 描述: pdb 是Python的内置调试器,可以逐行执行代码,检查变量,设置断点等。
  • 使用方法:
import pdb
pdb.set_trace()

python在你想开始调试的地方插入 pdb.set_trace(),程序会在这里暂停,进入调试模式。

  • 常用命令:
    • n (next): 执行下一行。
    • c (continue): 继续执行直到下一个断点。
    • s (step): 进入函数内部。
    • q (quit): 退出调试器。