增加 VSCode 调试程序 Scanf 无法输入问题。

Signed-off-by: rick.chan <cy@haoan119.com>
This commit is contained in:
rick.chan 2025-04-02 19:30:22 +08:00
parent 6ee5b499fa
commit a0c8142948

View File

@ -0,0 +1,21 @@
# VSCode 调试程序 Scanf 无法输入问题
VSCode 调试 C/C++/Golang 等程序时,遇到 fmt.Scan/fmt.Scanf/fmt.Scanln 等输入时,在 Debug Console 中是无法输入的。
解决办法是在调试的 launch.json 中添加:"console": "integratedTerminal",如下:
```json
{
// ...
"configurations": [
// ...
{
// ...
"console": "integratedTerminal",
// ...
},
// ...
],
// ...
}
```