除了我,我所有的朋友的VS Code调试器都运行良好,除了我,他们都不使用Mac。谢谢您的任何帮助。
当我在VS Code(Mac)中处于调试模式时,我的交互式终端无法正常工作。 cppdbg
终端没有显示,而是终端窗口停留在“终端将被任务重用,按任意键将其关闭”,在Tasks-C / C ++:gcc构建活动文件中。我已经附加了终端的屏幕截图,并且还粘贴了launch.json
。
我还附上了我朋友的vs代码的屏幕截图,其中弹出了他们的cppdbg
终端窗口,显示在终端窗口“终端将被任务重用,按任意键将其关闭”后弹出。
但是,在我的情况下,终端窗口停留在“终端将被任务重用,按任意键将其关闭”,并且没有弹出cppdbg
终端。
矿山,坏了:
我朋友的工作,
我的launch.json
文件:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "gcc - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "lldb",
"preLaunchTask": "C/C++: gcc build active file"
}
]
}
答案 0 :(得分:0)
对于macOS,这看起来很正常。
请参阅本指南:Using Clang in Visual Studio Code
在我看来,VSCode C ++尚未为macOS量产。
在C/C++ for Visual Studio Code
1.0.1中,简单的“ cin >> str”代码将锁定调试器。
答案 1 :(得分:0)
我无法在 Catalina 上使用 ccpdbg 进行调试,但它适用于名为 CodeLLDB 的扩展 https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb