microsoft / microsoft/vscode-cpptools

Source not available if the path contains unicode char when hit bp

Open
#507 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Internal bug id: 196744

Repro:

  1. Puting your source code under path like: /home/tester/Documents/test司法

  2. Open in VS Code

  3. Set some BP

  4. 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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.