debugging VS CODE无法调试其他PC上的C程序[已关闭]

de90aj5v  于 2023-03-13  发布在  其他
关注(0)|答案(1)|浏览(161)

**已关闭。**此问题不符合Stack Overflow guidelines。当前不接受答案。

这个问题似乎与help center中定义的范围内的编程无关。
22小时前关门了。
Improve this question
我试图调试我的代码与Win10的表PC上,但我得到的错误说,没有这样的目录存在。检查launch.json和tasks.json和路径后,一切检查出来。我得到这个恼人的错误,只有在这台PC上。
launch.json

{
    "configurations": [
    {
      "name": "C/C++: gcc.exe build and debug active file",
      "type": "cppdbg",
      "request": "launch",
      "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
      "args": [],
      "stopAtEntry": false,
      "cwd": "${fileDirname}",
      "environment": [],
      "externalConsole": false,
      "MIMode": "gdb",
    "miDebuggerPath": "C:\\msys64\\mingw64\\bin\\gdb.exe",
    "setupCommands": [
    {
      "description": "Enable pretty-printing for gdb",
      "text": "-enable-pretty-printing",
      "ignoreFailures": true
    },
   ]
  }
  ],
  "preLaunchTask": "C/C++: gcc.exe build active file"

tasks.json

{
    "tasks": [
        {
          "type": "cppbuild",
          "label": "C/C++: gcc.exe build active file", 
          "command": "C:\\msys64\\mingw64\\bin\\gcc.exe",
          "args": [
            "-fdiagnostics-color=always",
            "-Wall",
            "-g",
            "${file}", 
            "-o",
            "${fileDirname}\\${fileBasenameNoExtension}.exe"
          ],
        "options": {
        "cwd": "${fileDirname}"
        },
        "problemMatcher": [
          "$gcc"
        ],
        "group": {
          "kind": "build",
          "isDefault": true
          },
            "detail": "Task generated by Debugger."
          }
        ],
        "version": "2.0.0"
 }

这是我尝试调试后得到的错误:Error:
Exe文件和code在同一个目录下,你能帮我弄清楚吗?
更改tasks.json和launch.json并检查路径

elcex8rz

elcex8rz1#

你使用的工具的某些组合不支持Unicode,使用ascii字符作为路径。通常避免空格也是个好主意。

相关问题