microsoft / microsoft/vscode-cpptools

The debug window displays garbled Chinese characters

Open
#9,984 5 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

Brief Issue Summary

image

CMake Tools Diagnostics
{
  "os": "win32",
  "vscodeVersion": "1.72.0",
  "cmtVersion": "1.12.27",
  "configurations": [
    {
      "folder": "d:\\CODE\\ccc",
      "cmakeVersion": "3.24.2",
      "configured": true,
      "generator": "Ninja",
      "usesPresets": false,
      "compilers": {
        "C": "d:/LLVM/bin/clang.exe",
        "CXX": "d:/LLVM/bin/clang++.exe"
      }
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": true,
    "activeBuildType": "Debug",
    "buildTypesSeen": [
      "Debug"
    ],
    "requests": [
      "file:///d%3A/CODE/ccc/main.cpp"
    ],
    "responses": [
      {
        "uri": "file:///d%3A/CODE/ccc/main.cpp",
        "configuration": {
          "includePath": [],
          "defines": [],
          "compilerPath": "d:/llvm/bin/clang++.exe",
          "compilerArgs": [],
          "compilerFragments": [
            "-g -Xclang -gcodeview -O0 -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd"
          ]
        }
      }
    ],
    "partialMatches": [],
    "targetCount": 29,
    "executablesCount": 1,
    "librariesCount": 0,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    }
  ]
}
Debug Log
[main] Building folder: ccc 
[main] Saving open files before configure/build
[build] Starting build
[driver] Start build all
[proc] Executing command: D:\CMake\bin\cmake.EXE --build d:/CODE/ccc/build --config Debug --target all --
[build] ninja: no work to do.
[cmakefileapi-parser] Read reply folder: d:\CODE\ccc\build\.cmake\api\v1\reply
[cmakefileapi-parser] Found index files: ["cache-v2-f09f286cca19790c2c67.json","cmakeFiles-v1-9042c838fd021b6aa1f5.json","codemodel-v2-0165c3f019d3303f17de.json","directory-.-Debug-d0094a50bb2071803777.json","index-2022-10-10T08-34-48-0419.json","target-Continuous-Debug-51e10f558b97e54dd865.json","target-ContinuousBuild-Debug-aafb08302e25225f9563.json","target-ContinuousConfigure-Debug-c3bd100bbbe7d8827e74.json","target-ContinuousCoverage-Debug-79a7ea552d1c5bdcbdea.json","target-ContinuousMemCheck-Debug-80a679f57ddc221deb66.json","target-ContinuousStart-Debug-6f436adb35d94786e487.json","target-ContinuousSubmit-Debug-45c38f46b28e0611c527.json","target-ContinuousTest-Debug-205c21f81dd6ac866a4d.json","target-ContinuousUpdate-Debug-69b6104786b7c9817a85.json","target-Experimental-Debug-5f1d3f8688e6339f9ede.json","target-ExperimentalBuild-Debug-4ea1d5f274cb5192dc2a.json","target-ExperimentalConfigure-Debug-29156ad82a1f236470de.json","target-ExperimentalCoverage-Debug-4f471d6582154cb798a7.json","target-ExperimentalMemCheck-Debug-8a19469960e7d9ab5ead.json","target-ExperimentalStart-Debug-413bfd42e4b8e4211427.json","target-ExperimentalSubmit-Debug-d0d76dfee668f0d38dac.json","target-ExperimentalTest-Debug-f59715b050b6c1e8b57a.json","target-ExperimentalUpdate-Debug-c919f9c985ecf63b58f6.json","target-Nightly-Debug-df81ad60e4487b810fb7.json","target-NightlyBuild-Debug-9f5f1b848fe76b844c90.json","target-NightlyConfigure-Debug-db5c06bffd8968fcfb09.json","target-NightlyCoverage-Debug-de7117e16c2cc4c24bfe.json","target-NightlyMemCheck-Debug-0f39d0f248905cf869e1.json","target-NightlyMemoryCheck-Debug-fd0d7f727b47cfbda7e2.json","target-NightlyStart-Debug-d747718746fe140e7896.json","target-NightlySubmit-Debug-8ecdfa23841f220a156b.json","target-NightlyTest-Debug-39173a1702860330bdf8.json","target-NightlyUpdate-Debug-fb0beda20888bae98133.json","target-tt-Debug-3552f4dfc3c86234ae5b.json","toolchains-v1-37e4b492618f5a45b91f.json"]
[build] Build finished with exit code 0
[cache] Reading CMake cache file d:/CODE/ccc/build/CMakeCache.txt
[cache] Parsing CMake cache string
[extension] [6902] cmake.build finished (returned 0)
Additional Information
Source code file Encoding

UTF-8

OS

Edition Windows 10 Pro
Version 21H2
Installed on ‎2021/‎1/‎30
OS build 19044.2006
Experience Windows Feature Experience Pack 120.2212.4180.0

Language

image

Compiler

image

Recurrence
cd any/dir/
mkdir ccc
cd ccc 
code .

Run command: CMake: Quick Start

Choose kit to image

Write some Chinese characters (e.g., 你好) and assign it to a variable.

Add a breakpoint after the variable.

Click the Debug button in status bar.

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 through the reported CMake: Quick Start flow and the Debug button on Windows, using a UTF-8 C++ source containing Chinese text and a breakpoint. The report names no implementation file or test; completion means the Chinese variable value is displayed correctly in the debug window without garbling.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript, vscode
Domain
desktop, developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.