Modern versions of GDB have learned to use the debuginfod protocol to fetch debuginfo and source files on the fly for programs / shared libraries it is debugging. In the command line version of GDB, this works nicely e.g., in Fedora Rawhide. When VSCODE drives gdb, part of this still works (the auto downloading of that content), but part doesn't (printing the source files). This is probably because - by necessity - downloaded source files are located in a lookaside cache directory instead of the original DWARF-named directory/filename. GDB knows the new name too, but something is getting lost on the way to VSCODE, because the latter tries to open only the original "/usr/src/debug/...." distro-build file names, not the $HOME/.cache/debuginfod_client/BUILDID/..... one with the downloaded content. So users are greeted with a "Unable to open ...." popup error.
Please look into whether gdb/MI can pass VSCODE the proper downloaded source file name, and whether VSCODE can use that in addition.
https://sourceware.org/elfutils/Debuginfod.html
Modern versions of GDB have learned to use the debuginfod protocol to fetch debuginfo and source files on the fly for programs / shared libraries it is debugging. In the command line version of GDB, this works nicely e.g., in Fedora Rawhide. When VSCODE drives gdb, part of this still works (the auto downloading of that content), but part doesn't (printing the source files). This is probably because - by necessity - downloaded source files are located in a lookaside cache directory instead of the original DWARF-named directory/filename. GDB knows the new name too, but something is getting lost on the way to VSCODE, because the latter tries to open only the original "/usr/src/debug/...." distro-build file names, not the $HOME/.cache/debuginfod_client/BUILDID/..... one with the downloaded content. So users are greeted with a "Unable to open ...." popup error.
Please look into whether gdb/MI can pass VSCODE the proper downloaded source file name, and whether VSCODE can use that in addition.
https://sourceware.org/elfutils/Debuginfod.html