Escaping of Backslashes in the args of a debug-configuration: Use single quotes for passing arguments to gdb
@sean-mcmanus がすでに取り組んでいます。
2026年6月8日 から。
評価
この issue はまだ評価されていません。
説明
Environment
- OS and Version: Windows
- VS Code Version: 1.122.0
- C/C++ Extension Version: 1.32.2
- If using SSH remote, specify OS of remote machine: Rocky 10
When debugging an cpp application under linux/gdb, then arguments are passed to the gdb without single quotes. For example
"args": [
"\\\\srv\\path1\\path2\\file.txt"
--> in gdb, this arguments arrives as:
-exec p argv[1]
$1 = 0x7fffffffd937 "\\srvpath1path2file.txt"
Putting the argument in additional single quotes is a workaroung when debugging with gdb (but not when debugging on Windows)
"args": [
"'\\\\srv\\path1\\path2\\file.txt'"
==> The cpptools-Extension should quote parameters with a single quote (')
Bug Summary and Steps to Reproduce
Bug Summary:
Steps to reproduce:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior:
Configuration and Logs
=thread-group-added,id="i1"
GNU gdb (Rocky Linux) 16.3-2.el9
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
enumclass_printer from enumclass_pretty_printer.py registered successfully.
chrono_printers from chrono_pretty_printer.py registered successfully.
=cmd-param-changed,param="debuginfod enabled",value="on"
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"
Stopped due to shared library event (no libraries added or removed)
Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 2, main (argc=5, argv=0x7fffffffd4d8) at /home/soti/dev/itpprog_main/iwan/src/iwants.c:75
75 char **envp = __environ; // { 0 };
Loaded '/lib64/libstdc++.so.6'. Symbols loaded.
Loaded '/lib64/libm.so.6'. Symbols loaded.
Loaded '/lib64/libgcc_s.so.1'. Symbols loaded.
Loaded '/lib64/libc.so.6'. Symbols loaded.
Execute debugger commands using "-exec <command>", for example "-exec info registers" will list registers in use (when GDB is the debugger)
-exec p argv[1]
$1 = 0x7fffffffd937 "\\srvpath1path2file.txt"
Other Extensions
No response
Additional context
No response
- 主要言語
- TypeScript
- スター
- 6.2k
- フォーク
- 1.7k
- 平均マージ
- 14時間 46分
- マージ済み PR(30日)
- 61
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/vscode-cpptools のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
microsoft/vscode-cpptools#14787 ·
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries オープンbug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 担当者 1 名 ·
-
Language Service more info needed
microsoft/vscode-cpptools#14778 · コメント 1 件 · 担当者 1 名 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 64/100
microsoft/vscode-cpptools#14769 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
microsoft/vscode-cpptools#14768 · コメント 1 件 ·
microsoft/vscode-cpptools の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
copse-dev/agent-pane#2953 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
calcite-components needs triage refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Esri/calcite-design-system#15203 ·