Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Azure-Vision
SuperDebug
Repository navigation
Code
Issues
Pull requests
1
(1)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
SuperDebug
/
example.py
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
18 lines (13 loc) · 1.02 KB
main
Breadcrumbs
SuperDebug
/
example.py
Copy path
Top
File metadata and controls
Code
Blame
18 lines (13 loc) · 1.02 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from collections import OrderedDict, defaultdict
from superdebug import debug
import time
debug("程序开始运行了,记得看时间哦")
story = ["从前有座山", "山里有座庙", "庙里有个老和尚", "老和尚在给小和尚讲故事", "讲什么呢"] * 10000 # 重复10000遍
config = OrderedDict({"标题": "和尚的故事", "内容": story, "更多信息": {"作者": ("老和尚", "小和尚", "小小和尚"), "时间": {"创作时间": "很久很久以前", "timestamp": time.time()}}})
debug("你可以同时debug多个变量,没有被设置名字的变量会显示为'?'", story, 提示 = "这个故事实在太长了,我们只打印其中的一段", config = config, 另一个提示 = "我们可以清晰地看出变量的嵌套结构")
from superdebug import mail
debug("让我们模拟一段耗时的任务,任务结束后我会向你发送邮件")
time.sleep(10)
mail("任务已处理完成")
debug("你收到邮件了吗?")
raise Exception("哎呀,程序出错了... 去在ipdb界面中调试程序吧")
You can’t perform that action at this time.