All Topics
All Topics
Technology
Technology
AI
AI
Business
Business
Entertainment
Entertainment
News
News
Programming
Programming
Security
Security
Science
Science
Design
Design
Environment
Environment
Finance
Finance
Crypto
Crypto
Politics
Politics
Sports
Sports
Education
Education
Gaming
Gaming
Art
Art
Music
Music
Health
Health
Books
Books
Food
Food
Travel
Travel
Personal
Personal
Bluesky
Twitter

Debugging Python Programs: Using the 'q' Package for Print-Based Tracing

4h ago· 17 min readenCode

Summary

This article is a chapter from "The Art of Debugging" open book, focusing on debugging Python programs. It covers print-based debugging techniques and introduces the 'q' package as a solution for tracing code when standard print statements get lost among existing output. The 'q' package redirects debug output to a separate file (/tmp/q), allowing developers to monitor it in a separate console without cluttering the main program's output streams.

Source

Twitter / XDebugging Python Programs: Using the 'q' Package for Print-Based Tracinggithub.com

Key quotes

· 3 pulled
The q package comes to rescue in this situation.
This package is designed for a quick code and function tracing.
By default it sends its output into the /tmp/q file, so in one console start watching this file.
Snippet from the RSS feed
The Art of Debugging Open Book. Contribute to stas00/the-art-of-debugging development by creating an account on GitHub.

You might also wanna read

Comments

Sign in to join the conversation.

No comments yet. Be the first.