Closed ChrisIdema closed 2 years ago
The issue is MinGW produces PDBs with Windows styled paths, MSYS/Cywgin produce Unix styled paths and we try our best to convert it back to your windows file system.
The debug adapter should recognize that you are running under MSYS, can you regab the logs with
"logging": {
"engineLogging": true,
"traceResponse": true
}
and share them here?
Here is my log file with traceResponse enabled: log.txt
I now see:
/c/c/git/cmake_vscode_experiments/subfolders/main/main.cpp
Which has the drive letter twice.
@WardenGnaw Any suggestions?
Replacing C:\msys64\usr\bin\gdb.exe
with C:\msys64\mingw64\bin\gdb.exe
solved this issue for me.
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
I'm experimenting with cmake in combination with vscode. I now have a project that builds and runs, but when debugging I can only see the source files under linux. The project has an external build folder and I think this is where the problem lies. It does work when I build with mingw32, but not when I build it with msys2, but I don't see how the compiler should affect the ability of the editor to find a source file.
Here is my simple project: https://github.com/ChrisIdema/cmake_vscode_experiments/tree/5b2a93b8b00aa145a2f04e42d8b95faca396a479/subfolders .
Steps to reproduce:
the editor could not be opened because the file could not be found
Debugger Configurations
Debugger Logs
Other Extensions
CMake CMake Tools
Additional Information
When I have a breakpoint in main the editor shows this path:
The path is absolute path of my buildfolder + the absolute path of my source file with a non-ascii character after the C. I have no idea how that ended up there.
If I check the logs and noticed something strange:
One thing I found was that changing the cwd setting allowed me to at least see some source files, but not others:
"cwd": "${workspaceFolder}/drivers",
or"cwd": "${workspaceFolder}/main",
But I cannot set cwd to both at the same time.
I checked these two issues: https://github.com/microsoft/vscode-cpptools/issues/5245 https://github.com/microsoft/vscode-cpptools/issues/257
But it didn't help (other than enabling logging)