English 中文(简体)
视觉演进室 法典在通过刺.进行洗bu时,可以找到 h。
原标题:Visual Studio Code can t find helloworld.cpp source file when debugging via gdb

遵循《联邦法典》Hello World example from Microsoft,并通过cygwin g++加以汇编和管理。 但是,当我尝试并驾.它,并在法典中规定一个突破点时,它就没有停止。 因此,我在发射时确定了“前沿工业”:真实。 json and it ends and provide a CALL STACK and when, 我请我点击(主机)框架,就会产生档案存在的错误。

“entergraph

通知它认为档案的位置:

“C:>cygwininC☐>Users>lehrian>Documents>C Projects>HelloWorld>helloworld.cpp”

我点击“Create file”,在那个地方立案,在这条路上带有高压的星号。 如果我把我的代码贴在案号VSCode中,就把该代码贴上标记,但我可以通过在档案中点击而另外定点。

我曾尝试使用“来源FileMap”来绘制C:cygwinin 至cygdrive,但这只影响C☐>左边的道路;Users>...... 问题似乎在于,《瑞士联邦法典》希望使用全视窗通向文件名称,但gdb是正确解释C:部分。

Does anyone have a solution? Can anyone recreate this issue? I do have the example code running and debugging correctly on Linux.

这里完全是我的发射。 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": "(gdb) Launch",
        "type": "cppdbg",
        "request": "launch",
        "program": "${workspaceFolder}/helloworld.exe",
        "args": [],
        "stopAtEntry": true,
        "cwd": "${fileDirname}",
        "environment": [],
        "externalConsole": false,
        "MIMode": "gdb",
        "miDebuggerPath": "c:/cygwin/bin/gdb",
        "setupCommands": [
            {
                "description": "Enable pretty-printing for gdb",
                "text": "-enable-pretty-printing",
                "ignoreFailures": true
            },
            {
                "description": "Set Disassembly Flavor to Intel",
                "text": "-gdb-set disassembly-flavor intel",
                "ignoreFailures": true
            }
        ]
    }

]
}

和任务。 json

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

[EDIT] Looking through the debug log I see the following line:

--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1655) ->1023^done,stack=[frame={level="0",addr="0x000000010040108d",func="main",file="C:\\Users\\lehrian\\Documents\\CProjects\\HelloWorld\\helloworld.cpp",fullname="/cygdrive/c/Users/lehrian/Documents/CProjects/HelloWorld/C:\\Users\\lehrian\\Documents\\CProjects\\HelloWorld\\helloworld.cpp",line="5",arch="i386:x86-64"}]
"},"seq":709} 1: (1655) ->1023^done,stack=[frame={level="0",addr="0x000000010040108d",func="main",file="C:\Users\lehrian\Documents\CProjects\HelloWorld\helloworld.cpp",fullname="/cygdrive/c/Users/lehrian/Documents/CProjects/HelloWorld/C:\Users\lehrian\Documents\CProjects\HelloWorld\helloworld.cpp",line="5",arch="i386:x86-64"}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (1655) ->(gdb)
"},"seq":711} 1: (1655) ->(gdb) 

看来,VSCode正在使用全称,其中包括通过圆顶通向档案的所有途径,然后通过Windows途径将全部途径连接到档案中。 它只应采用温和的道路。 是否有办法在优惠或选择或环境中说明这一点?

问题回答




相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签