Conditional breakpoints are extremely useful, but everyone knows [citation needed] that they’re super slow, to the point where people stop using them. Visual Studio recently did some good improvements and @ryanjfleury still dunked on it for being too slow. But even raddbg takes ~2 seconds to execute 10000 iterations of a simple loop with conditional breakpoints inside. For comparison, the…
Today’s article is a collection of materials to learn more about debuggers: how they work, which technologies are under the hood, what kind of problems exist in this area. There is of course a big overlap with related components like compilers and linkers, so get ready to learn lots of new things 😃. Of course, the list is not exhaustive by any means. These are just the links I’ve…
Last year I was working on improving debugging experience for Wine/Proton and part of that work went into supporting process crashdumps. Supporting minidumps was particularly important and of course it turned out things were broken. I worked on this problem more than a year ago and things may have changed since then. This article is a reconstruction of my old notes since I find the story is quite…
It’s a good practice to always include width and height attributes on images and video elements. Without them the browser has no way of knowing how large the image is going to be and cannot reserve the space in advance when rendering the page. This often leads to the content moving around during the page load, since images take extra time to fetch. This is called Layout Shift and I find it…
When people say “debuggers are useless and using logging and unit-tests is much better,” I suspect many of them think that debuggers can only put breakpoints on certain lines, step-step-step through the code, and check variable values. While any reasonable debugger can indeed do all of that, it’s only the tip of the iceberg. Think about it; we could already step through the code…
In my efforts to get better at Rust I’ve recently been working on a terminal-based roguelike game 🦀. One of the first things terminal-based applications (e.g. games, text editors, tools like top ) do at startup is switch the terminal into raw mode . This article is about a short journey of how-do-I-get-a-pretty-panic-backtrace-when-my-terminal-is-in-raw-mode.
In my previous post about Wine I mentioned working on a debugger that is capable of debugging both the Wine layer and the Windows application running with it. Time to share some details!
Wine is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, macOS, & BSD ( https://www.winehq.org ). If you have been using Linux for some time now, chances are you’ve used Wine at some point. Maybe to run that one very important Windows program that doesn’t have a Linux version or maybe to play World of Warcraft or some other…
There has been lots of discussions recently about the usefulness of debuggers (on Twitter/Reddit and probably other platforms). Some people brag about never using/needing one and some people can’t imagine their life without stepping through the code line by line. I’m both of these people at different times, so I’m not going to judge anyone. Instead, let me share a short debugging…
Last week I got an interesting bug report from a colleague. They were minding their own business and playing with Unreal Engine 5 when suddenly a wild build error appeared and said that some precompiled headers are out of date: fatal error: file 'D:\toolchain\sysroot\usr\include\x86_64-linux-gnu\bits\wordsize.h' has been modified since the precompiled header…
Visual Studio extensions are typically distributed via VSIX packages . Visual Studio comes with an installer vsixinstaller.exe , which handles the actuall installation process. When you download the VSIX file from the extension gallery and then double-click it or when you install the extension from Visual Studio via the “Extensions and Updates” menu the above mentioned installer is…
Benchmarks are often underestimated and don’t get the same attention as tests. However “performance is a feature” and when something is not tested it might as well be just broken. If the performance is not measured/tracked regressions are inevitable. Modern tooling makes it really easy to write benchmarks. Some languages have built-in support, for example, Rust comes with cargo…
Expression evaluation is an integral part of any modern debugger. It allows the user to inspect the program state using the familiar syntax of the target language, as well as perform modifications to the target process (if the side-effects are allowed). If you have ever used command-line debuggers, you’re probably familiar with it via commands like print / call in GDB or expr / p in LLDB. It…
Sometimes you want to (or need to) debug a program that you didn’t build yourself and you don’t even know how exactly it was built. Depending on the specifics of your setup that could mean many different things: Built on a build farm, running on a production server/container Installed via apt or similar, running locally … This post is inspired by my experience of debugging LLDB…
If you often use ssh+tmux combination and ssh keys forwarding, you’ve definitely been in an unpleasant situation: connect to some remote machine via ssh and create a tmux session use it happily detach from tmux and disconnect from server connect again (e.g. next day) and attach to the tmux session push something to git (or connect to another server)… … Permission denied…