microsoft / microsoft/vscode-cpptools

VSCode opens different file with the same name while debugging

Open
#8,430 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug type: Debugger

Describe the bug

  • OS and Version: Amazon Linux 2
  • VS Code Version: 1.61.2
  • C/C++ Extension Version: 1.7.1
  • Other extensions you installed (and if the issue persists after disabling them): yes
  • A clear and concise description of what the bug is.

To Reproduce

  1. Debugging the open source mysql code in Amazon linux. I set the breakpoint on the file sql/dd/upgrade_57/table.cc and launch the mysqld to debug.
  2. The debugger hits in the different file with same name present at different location that is sql/table.cc . It hits the same line number though in that file. As you can see from the attache screenshots.
Screenshot 2021-11-22 at 7 51 09 AM Screenshot 2021-11-22 at 7 51 09 AM

Additional context
If applicable, please include logging by adding "logging": { "engineLogging": true, "trace": true, "traceResponse": true } in your launch.json
Attached the filtered log -
filtered.txt

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

Start with the attached filtered.txt log and reproduce debugging the MySQL source with a breakpoint in sql/dd/upgrade_57/table.cc. Compare how the debugger resolves that path with sql/table.cc, which has the same filename. Done means the breakpoint opens and stays mapped to the selected source file rather than the other same-named file.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.