Skip to main content

Debugging

Browse all articles, tutorials, and guides about Debugging

6posts

Posts

Cloud
|11 min read

Git Bisect for Your Data

You know the number is wrong today. Nobody knows when it started. git bisect answers that question for code by checking out old commits; the same search works on a database if you can read it as it was at an arbitrary moment. Here is a CLI that does it, measured against a real Postgres, and the one limit that decides whether it can help you at all.

DevOps
|7 min read

node-postgres Silently Ignores Your TLS Config When the URL Says sslmode

If your connection string contains sslmode=require, the pg library throws away the ssl options object where you loaded your CA certificate, and verification fails with "self-signed certificate in certificate chain". Here is the trap, the fix, and the v9 changes coming.

Linux
|6 min read

Why Does the C Preprocessor Interpret "linux" as "1"?

Discover why the word 'linux' is predefined as the constant 1 in the C preprocessor on Linux systems, and how this historical quirk can cause unexpected compilation errors.

Docker
|16 min read

How to Access a Docker Container's Shell, Run Commands and Copy Files

Open a shell with docker exec, run one-off commands, get root without sudo, add bash or ps to a slim image, edit and copy files with docker cp, look inside an image that has no shell, and debug a stopped container.

Networking
|8 min read

Capturing Mobile Phone Traffic on Wireshark

Learn how to capture and analyze network traffic from your mobile phone using Wireshark. Set up a proxy or WiFi hotspot to inspect HTTP/HTTPS requests, debug mobile apps, and understand what data your phone is sending.

Linux
|8 min read

How to Profile C++ Code Performance on Linux

Learn how to use profiling tools like gprof, Valgrind, and perf to analyze C++ application performance and identify bottlenecks on Linux systems.