How to debug Python code in Visual Studio Code(qodo.ai) Remember when finding Python bugs meant peppering your code with print statements? Well, those days are over. Visual Studio Code packs a punch when it comes to Python debugging. Think breakpoints that trigger only when your conditions match, real-time variable tracking, and the ability to freeze time in your code execution. Whether you’re hunting down race conditions or memory leaks, these tools will make your debugging sessions so much more productive.
Printf debugging is ok(polymonster.co.uk) I stopped going on Twitter a while ago because it has the tendency to evoke rage, as it is designed to do. But every now and then I check back in - it can be useful sometimes for keeping up with graphics research, gamedev news and some people do post nice things, like sharing projects they are working on, so there is something to pull me back from time to time.
119 points by thunderbong 12 days ago | 145 comments
Git Bisecting a Bug (Apache NuttX RTOS)(lupyuen.org) 2 Weeks Ago: We saw a Runtime Bug in Apache NuttX RTOS. We think that the Breaking Commit (causing the bug) falls somewhere between these “Good” and “Bad” Commits…
Fixing sleep-wake hangs on Linux with AMD GPUs(gitlab.io) I dual-boot my desktop between Windows and Linux. Over the past few years, Linux would often crash when I tried to sleep my computer with high RAM usage. Upon waking it would show a black screen with moving cursor, or enter a "vegetative" state with no image on-screen, only responding to magic SysRq or a hard reset. I traced this behavior to an amdgpu driver power/memory management bug, which took over a year to brainstorm and implement solutions for.
Missing the Forest for the Trees with Flame Graphs(ankush.dev) Flame graphs are an amazing tool to visualize the performance of software and I'll forever be grateful to Brendan Gregg for creating them. There is however one catch that you should be aware of though. They tend to hide small overheads that have a bigger overall impact very well.
Skipping Boring Functions in Debuggers(maskray.me) In debuggers, stepping into a function with arguments that involve function calls may step into the nested function calls, even if they are simple and uninteresting, such as those found in the C++ STL.
369 points by pierremenard 20 days ago | 190 comments
Demystifying Common Microcontroller Debug Protocols [video](media.ccc.de) Many developers know that the answer to "How do I debug this microcontroller" is either "JTAG" or "SWD". But what does that mean, exactly? How do you get from "Wiggling wires" to "Programming a chip" and "Halting on breakpoints"? This talk will cover how common debug protocols work starting from signals on physical wires, cover common mechanisms for managing embedded processors, and ending up at talking to various common microcontrollers.
200 points by robenkleene 25 days ago | 24 comments
A Practitioner's Guide to Wide Events(jeremymorrell.dev) Adopting Wide Event-style instrumentation has been one of the highest-leverage changes I’ve made in my engineering career. The feedback loop on all my changes tightened and debugging systems became so much easier. Systems that were scary to work on suddenly seemed a lot more manageable.
Cqd: Colour my __dir__ please(github.com/rayking99) A lightweight Python utility that provides colored visualization of object attributes, making it easier to inspect objects during development and debugging.