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

推荐订阅源

Y
Y Combinator Blog
IT之家
IT之家
博客园_首页
人人都是产品经理
人人都是产品经理
博客园 - Franky
I
InfoQ
Recent Announcements
Recent Announcements
P
Proofpoint News Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
雷峰网
雷峰网
博客园 - 聂微东
N
Netflix TechBlog - Medium
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
D
Docker

博客园 - MikeLi

ssh Linux install idea ubuntu耳机问题 一个好的计算机学习网站 正则表达式 gitee 设置 javac编译命令 git Ubuntu安装chrome浏览器 Linux安装配置JDK jdk 8 文档和API列表 「转」Java开发的构建工具 netbeans11从源码构建安装教程 Maven国内镜像 Java IDE:NetBeans 如何输入EOF ubuntu截图与录屏 如何在Linux里寻找、安装和卸载软件包How to install and update software in Linux memory
debug in C,Java,Python
MikeLi · 2025-08-31 · via 博客园 - MikeLi
languge: C Java Python
compiler: gcc -g hello_world.c javac -g HelloWorld.java

method 1:

import pdb

pdb.set_trace()

python hello_world.py

method 2:

python -m pdb hello_world.py

execute program: gdb ./a.out jdb Helloworld same with compiler
set breakpoint:

break 18(line number

you want to set break)

break at print()

break in 18 

break
start execution: run run  no start exection command
continue execution: continue continue continue
step execution: step step step
print variable: print your_variable_name print/dump your_variable_name p your_variable_name
show local variable: info locals locals

locals() (priority use, it will not print extra info)

globals()

dir()

eval()

nextline: next next next
show code: list list list
end execution: quit quit quit

posted @ 2025-08-31 10:39  MikeLi  阅读(20)  评论()    收藏  举报