microsoft / microsoft/vscode-cpptools

gdb debugger set auto-load safe-path / no effect

Open
#13,663 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debugger help wanted
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Type: Bug

  1. create any cmake project.
  2. use gdb debugger to debug app
  3. add .gdbinit to project root directory. The content is:
python
print("Local GDB Init")
end
  1. add config to ~/.gdbinit:
set auto-load local-gdbinit on
set auto-load safe-path /
add-auto-load-safe-path /

python
print("Global GDB init")
end
  1. start gdb debugger from VSCode, it will show Global GDB init but no Local GDB Init. So, project's .gdbinit not run.

Extension version: 1.25.3
VS Code version: Code 1.100.2 (848b80aeb52026648a8ff9f7c45a9b0a80641e2e, 2025-05-14T21:47:40.416Z)
OS version: Windows_NT x64 10.0.19045
Modes:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in a CMake project using the reported VS Code, Windows, GDB, and .gdbinit settings. Compare the global and project-local initialization behavior, then verify that the local file produces its expected output when auto-load is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, vscode
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.