Today, mid way through iterating a feature in one of my C/C++ repos in Kubuntu, VS Codium (and underlying LLDB) just stopped allowing me to place breakpoints in a couple of my shared libraries. I have absolutely no idea what happened, and nothing I do seems to fix the issue.
Firstly, for context, the issue manifests itself in the following way:
When debugging an executable that uses the libraries in my repo, placing a breakpoint in the library I was attempting to debug simply greys out the breakpoint in VS code. Hovering over the breakpoint displays "Resolved locations: 0".
Typing a command into LLDB directly gives me an error:
b hud_crosshair.cpp:47
Breakpoint 4: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
The issue does not occur in every target I have in the repo. The executable itself, for example, allows me to place breakpoints as normal. The issue only occurs in two specific shared libraries (as this is a Half Life engine re-implementation, these libraries are the game client and server libraries used for game code).
When I run
file
to check the libraries that LLDB is having issues with, it reports that debug symbols are present, as they have always been as far as I'm aware:
$ file client_amd64.so
client_amd64.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked,
BuildID[sha1]=1b6e2c5a54a64d3c851b45ed94cc9d1a5a09284b, with debug_info, not stripped
$ file server_amd64.so
server_amd64.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked,
BuildID[sha1]=c77a4a747c0d4e2cac7294403bd6c6eddb110cc8, with debug_info, not stripped
I was debugging absolutely fine in this repo for most of today. Between one incremental build and the next, breakpoints simply stopped working. I did have something similar happen once upon a time where a VS Codium extension live-updated to a broken version while I was working, but I have had automatic updates disabled ever since and no updates were performed while I was working today. Furthermore, older versions of extensions to not seem to make any difference (see below).
I have tried the following to resolve this issue, without success:
- Deleting my build folder and doing a clean rebuild.
- Reverting to previous Git commits/ other Git branches and rebuilding.
- Restarting VS Codium.
- Restarting my machine.
- Reverting to previous versions of the CodeLLDB and CMake Tools extensions.
- Updating the packages on my system.
Versions of various things I'm using:
- VS Codium 1.80.0, Release 23188 (Linux x64 6.2.0-20-generic)
- CMake Tools extension v1.15.31
- CodeLLDB extension v1.9.2, running lldb version 16.0.0-custom
- gcc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0
- g++ (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0
- cmake version 3.25.1
- Kubuntu 23.04, kernel 6.2.0-20-generic (64-bit)
Is there anything I can do to try and investigate this further? I am truly stumped.
info sources hud_crosshair.cpp
and see if any of the loaded libraries actually contain that file. My guess is that for some reason, either that file is no longer compiled into any library, or the library containing that file is no longer being loaded.[ERROR codelldb::debug_session]
lines when it begins, but no more information than that. I may take this up with the extension owners and see where I can go from there.