microsoft / microsoft/vscode-cpptools
Source not available if the path contains unicode char when hit bp
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Internal bug id: 196744
Repro:
-
Puting your source code under path like: /home/tester/Documents/test司法
-
Open in VS Code
-
Set some BP
-
F5 tostart debugging
Expected:
VS Code is able to find the place to stop in source code
Actual:
Stopped at a place and show:
Source /home/tester/Documents/test345217270346263225/a.cpp is not available.
Investigation:
There is no such path /home/tester/Documents/test345217270346263225/,
it should be /home/tester/Documents/test司法
Inside of MI mode, GDB sends the actual document using Unicode escapes. For instance in the case I am looking at, the actual returned path is /home/jacdavis/tests\345\217\260\345\214\227/a.out.
That is a gdb bug. We should check and see if we can work around this by translating those back to Unicode, but we may be out of luck here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported breakpoint failure with a source path containing Unicode characters, then inspect how MI-mode GDB's escaped paths are handled. Compare the returned escaped path with the actual filesystem path; done means VS Code can stop at the breakpoint and display the source instead of reporting it unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100