Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot debug MinGW anymore #1067

Closed
Darky-Lucera opened this issue Feb 12, 2020 · 8 comments
Closed

Cannot debug MinGW anymore #1067

Darky-Lucera opened this issue Feb 12, 2020 · 8 comments
Labels
bug a bug in the product Feature: debug/launch fixed (release pending) fixed in pre-release and is pending official release IMPORTANT
Milestone

Comments

@Darky-Lucera
Copy link

Brief Issue Summary

I'm not able to debug anymore with Visual Studio Code 1.42 (user), CMake Tools 1.3.0, MinGW 17.1 (GCC 9.2.0) from nuwen (https://nuwen.net/mingw.html)

Pressing the [Debug] button, I get the message "Launch program 'BuildPath \ FullExecutableFileAndDirectory' do not exists.

Where BuildPath is my current cmake build path: 'c:\project\build' and FullExecutableFileAndDirectory if the full path to my current selected executable: c:\project\bin\foo.exe

Concatenated: c:\project\build\c:\project\bin\foo.exe

This is the content of my 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": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${command:cmake.launchTargetPath}",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        },
    ]
}

Expected:

Do not concatenate the build directory and the full path of the executable.

CMake Tools Log

2020-02-12T12:21:27.945Z [info] [main] Building folder: Example Exercise1
2020-02-12T12:21:28.140Z [debug] [main] Saving open files before configure/build
2020-02-12T12:21:28.334Z [info] [build] Starting build
2020-02-12T12:21:28.376Z [debug] [driver] Start build Exercise1
2020-02-12T12:21:28.376Z [debug] [driver] Runnnig pre-configure checks and steps
2020-02-12T12:21:28.380Z [info] [proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/Work/Example/build --config Debug --target Exercise1 -- -j 6
2020-02-12T12:21:29.442Z [info] [build] [ 16%] Built target minifb
2020-02-12T12:21:29.599Z [info] [build] [ 70%] Built target MindShake
2020-02-12T12:21:30.034Z [info] [build] [ 90%] Built target engine
2020-02-12T12:21:30.374Z [info] [build] [100%] Built target Exercise1
2020-02-12T12:21:30.595Z [debug] [cmakefileapi-parser] Read reply folder: c:\Work\Example\build\.cmake\api\v1\reply
2020-02-12T12:21:30.596Z [debug] [cmakefileapi-parser] Found index files: ["cache-v2-d187fc0f5e5cb0f39708.json","codemodel-v2-c72d883b4302cc6ec5bf.json","index-2020-02-12T12-05-33-0061.json","target-engine-Debug-49188a974d00e619c592.json","target-Exercise1-Debug-c62fdad287cc5c21f043.json","target-input_events-Debug-73563e3136b10a57f189.json","target-input_events_cpp-Debug-ba210035d24b7dc7d152.json","target-MindShake-Debug-845d700a4f3d9bdb73d6.json","target-minifb-Debug-8833223ab5d7ed2dd34f.json","target-multiple_windows-Debug-f85e8bac54486d63b285.json","target-noise-Debug-da12f99242748f96d7ba.json","target-TestSceneNode-Debug-2f1544916dff6ff6cbea.json"]
2020-02-12T12:21:30.613Z [debug] [driver] Run _refreshExpansions
2020-02-12T12:21:30.613Z [debug] [driver] Run _refreshExpansions cb
2020-02-12T12:21:30.623Z [info] [build] Build finished with exit code 0
2020-02-12T12:21:30.630Z [debug] [cache] Reading CMake cache file c:/Work/Example/build/CMakeCache.txt
2020-02-12T12:21:30.631Z [debug] [cache] Parsing CMake cache string
2020-02-12T12:21:30.646Z [info] [proc] Executing command: C:/MinGW/bin/gdb.exe --version
2020-02-12T12:21:30.806Z [debug] [main] Debug configuration from cache: {"type":"cppdbg","name":"Debug Exercise1","request":"launch","cwd":"${workspaceFolder}","args":[],"MIMode":"gdb","miDebuggerPath":"C:/MinGW/bin/gdb.exe","setupCommands":[{"description":"Enable pretty-printing for gdb","text":"-enable-pretty-printing","ignoreFailures":true}],"program":"C:\\Work\\Example\\build\\C:\\Work\\Example\\bin\\Exercise1.exe"}
2020-02-12T12:21:30.806Z [debug] [main] Starting debugger with following configuration. {"workspace":"file:///c%3A/Work/Example","config":{"type":"cppdbg","name":"Debug Exercise1","request":"launch","cwd":"${workspaceFolder}","args":[],"MIMode":"gdb","miDebuggerPath":"C:/MinGW/bin/gdb.exe","setupCommands":[{"description":"Enable pretty-printing for gdb","text":"-enable-pretty-printing","ignoreFailures":true}],"program":"C:\\Work\\Example\\build\\C:\\Work\\Example\\bin\\Exercise1.exe"}}
2020-02-12T12:21:30.852Z [debug] [cache] Reading CMake cache file c:/Work/Example/build/CMakeCache.txt
2020-02-12T12:21:30.856Z [debug] [cache] Parsing CMake cache string
2020-02-12T12:21:33.354Z [debug] [extension] [5791] cmake.debugTarget finished (returned undefined)

Developer Tools Log

abstractExtensionService.ts:396 [idleberg.nsis]: Unknown language in `contributes.nsis.language`. Provided value: haskell
_logMessageInConsole @ abstractExtensionService.ts:396
console.ts:137 [Extension Host] activating extension
console.ts:137 [Extension Host] starting language server
console.ts:137 [Extension Host] (node:2208) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ console.ts:137
console.ts:137 [Extension Host] (node:2208) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ console.ts:137
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:58.139Z [debug] [main] Safe constructing new CMakeTools instance
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:58.140Z [debug] [variant] Constructing VariantManager
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:58.143Z [debug] [main] Constructing new CMakeTools instance
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:58.144Z [debug] [main] Starting CMakeTools second-phase init
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:58.323Z [info] [variant] Loaded new set of variants
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:58.327Z [debug] [main] CMakeTools instance initialization complete.
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:58.354Z [debug] [kit] Reading kits file C:\Users\caragone\AppData\Local\CMakeTools\cmake-tools-kits.json
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:58.452Z [info] [kit] Successfully loaded 22 kits from C:\Users\caragone\AppData\Local\CMakeTools\cmake-tools-kits.json
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:58.459Z [debug] [kit] Not reading non-existent kits file: c:\Work\Example\.vscode\cmake-kits.json
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:58.460Z [debug] [main] Injecting new Kit into CMake driver
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:58.472Z [debug] [extension] Configuring workspace on open file:///c%3A/Work/Example
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:58.474Z [info] [main] Configuring folder: Example 
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:58.474Z [debug] [main] Saving open files before configure/build
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.193Z [debug] [main] Starting new CMake driver
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.193Z [debug] [main] Starting CMake driver
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.195Z [debug] [cmakefileapi-driver] Creating instance of CMakeFileApiDriver
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.196Z [debug] [driver] CMakeDriver Kit set to GCC 8.2.0
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.198Z [debug] [driver] Trying to detect generator supported by system
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.214Z [debug] [driver] Command version test return code -1
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.222Z [debug] [driver] Command version test return code -1
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.328Z [debug] [driver] Command version test return code 0
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.328Z [debug] [driver] Run _refreshExpansions
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.328Z [debug] [driver] Run _refreshExpansions cb
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.331Z [debug] [cache] Reading CMake cache file c:/Work/Example/build/CMakeCache.txt
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.333Z [debug] [cache] Parsing CMake cache string
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.360Z [debug] [cmakefileapi-parser] Read reply folder: c:\Work\Example\build\.cmake\api\v1\reply
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.362Z [debug] [cmakefileapi-parser] Found index files: ["cache-v2-d187fc0f5e5cb0f39708.json","codemodel-v2-c72d883b4302cc6ec5bf.json","index-2020-02-12T12-05-33-0061.json","target-engine-Debug-49188a974d00e619c592.json","target-Exercise1-Debug-c62fdad287cc5c21f043.json","target-input_events-Debug-73563e3136b10a57f189.json","target-input_events_cpp-Debug-ba210035d24b7dc7d152.json","target-MindShake-Debug-845d700a4f3d9bdb73d6.json","target-minifb-Debug-8833223ab5d7ed2dd34f.json","target-multiple_windows-Debug-f85e8bac54486d63b285.json","target-noise-Debug-da12f99242748f96d7ba.json","target-TestSceneNode-Debug-2f1544916dff6ff6cbea.json"]
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.393Z [debug] [driver] Setting new variant , Disable optimizations - include debug information.
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.394Z [debug] [driver] Run _refreshExpansions
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:34:59.394Z [debug] [driver] Run _refreshExpansions cb
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.032Z [debug] [driver] Start configure 
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.033Z [debug] [driver] Runnnig pre-configure checks and steps
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.035Z [debug] [driver] Using compilers in GCC 8.2.0 for configure
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.040Z [debug] [driver] Run _refreshExpansions
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.041Z [debug] [driver] Run _refreshExpansions cb
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.050Z [debug] [cmakefileapi-driver] Invoking CMake C:\Program Files\CMake\bin\cmake.EXE with arguments ["--no-warn-unused-cli","-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE","-DCMAKE_BUILD_TYPE:STRING=Debug","-DCMAKE_C_COMPILER:FILEPATH=C:\\MinGW\\bin\\gcc.exe","-DCMAKE_CXX_COMPILER:FILEPATH=C:\\MinGW\\bin\\g++.exe","-Hc:/Work/Example","-Bc:/Work/Example/build","-G","Unix Makefiles"]
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.059Z [info] [proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=C:\MinGW\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\MinGW\bin\g++.exe -Hc:/Work/Example -Bc:/Work/Example/build -G "Unix Makefiles"
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.287Z [info] [cmake] Not searching for unused variables given on the command line.
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.535Z [error] [cmake] Processing Example
t.log @ console.ts:137
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.546Z [error] [cmake] Processing MiniFB
t.log @ console.ts:137
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.547Z [error] [cmake] Done MiniFB
t.log @ console.ts:137
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.551Z [error] [cmake] Processing MindShake
t.log @ console.ts:137
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.552Z [error] [cmake] CMAKE_BUILD_TYPE: Debug
t.log @ console.ts:137
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.590Z [error] [cmake] CMAKE_BUILD_TYPE: Debug
t.log @ console.ts:137
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:00.613Z [info] [cmake] -- Configuring done
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:01.450Z [info] [cmake] -- Generating done
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:02.131Z [info] [cmake] -- Build files have been written to: C:/Work/Example/build
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:02.149Z [debug] [cmakefileapi-parser] Read reply folder: c:\Work\Example\build\.cmake\api\v1\reply
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:02.150Z [debug] [cmakefileapi-parser] Found index files: ["cache-v2-d187fc0f5e5cb0f39708.json","codemodel-v2-c72d883b4302cc6ec5bf.json","index-2020-02-12T12-35-02-0128.json","target-engine-Debug-49188a974d00e619c592.json","target-Exercise1-Debug-c62fdad287cc5c21f043.json","target-input_events-Debug-73563e3136b10a57f189.json","target-input_events_cpp-Debug-ba210035d24b7dc7d152.json","target-MindShake-Debug-845d700a4f3d9bdb73d6.json","target-minifb-Debug-8833223ab5d7ed2dd34f.json","target-multiple_windows-Debug-f85e8bac54486d63b285.json","target-noise-Debug-da12f99242748f96d7ba.json","target-TestSceneNode-Debug-2f1544916dff6ff6cbea.json"]
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:02.753Z [debug] [cache] Reading CMake cache file c:/Work/Example/build/CMakeCache.txt
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:02.756Z [debug] [cache] Parsing CMake cache string
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:03.680Z [debug] [cache] Reading CMake cache file c:/Work/Example/build/CMakeCache.txt
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:03.682Z [debug] [cache] Parsing CMake cache string
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:19.309Z [debug] [extension] [1399] cmake.debugTarget started
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:20.141Z [info] [main] Building folder: Example Exercise1
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:20.324Z [debug] [main] Saving open files before configure/build
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:20.608Z [info] [build] Starting build
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:20.642Z [debug] [driver] Start build Exercise1
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:20.642Z [debug] [driver] Runnnig pre-configure checks and steps
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:20.752Z [info] [proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build c:/Work/Example/build --config Debug --target Exercise1 -- -j 6
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:21.872Z [info] [build] [ 16%] Built target minifb
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:22.029Z [info] [build] [ 70%] Built target MindShake
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:22.448Z [info] [build] [ 90%] Built target engine
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:22.798Z [info] [build] [100%] Built target Exercise1
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:22.998Z [debug] [cmakefileapi-parser] Read reply folder: c:\Work\Example\build\.cmake\api\v1\reply
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:22.999Z [debug] [cmakefileapi-parser] Found index files: ["cache-v2-d187fc0f5e5cb0f39708.json","codemodel-v2-c72d883b4302cc6ec5bf.json","index-2020-02-12T12-35-02-0128.json","target-engine-Debug-49188a974d00e619c592.json","target-Exercise1-Debug-c62fdad287cc5c21f043.json","target-input_events-Debug-73563e3136b10a57f189.json","target-input_events_cpp-Debug-ba210035d24b7dc7d152.json","target-MindShake-Debug-845d700a4f3d9bdb73d6.json","target-minifb-Debug-8833223ab5d7ed2dd34f.json","target-multiple_windows-Debug-f85e8bac54486d63b285.json","target-noise-Debug-da12f99242748f96d7ba.json","target-TestSceneNode-Debug-2f1544916dff6ff6cbea.json"]
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:23.017Z [debug] [driver] Run _refreshExpansions
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:23.017Z [debug] [driver] Run _refreshExpansions cb
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:23.029Z [info] [build] Build finished with exit code 0
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:23.039Z [debug] [cache] Reading CMake cache file c:/Work/Example/build/CMakeCache.txt
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:23.041Z [debug] [cache] Parsing CMake cache string
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:23.075Z [info] [proc] Executing command: C:/MinGW/bin/gdb.exe --version
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:23.277Z [debug] [main] Debug configuration from cache: {"type":"cppdbg","name":"Debug Exercise1","request":"launch","cwd":"${workspaceFolder}","args":[],"MIMode":"gdb","miDebuggerPath":"C:/MinGW/bin/gdb.exe","setupCommands":[{"description":"Enable pretty-printing for gdb","text":"-enable-pretty-printing","ignoreFailures":true}],"program":"C:\\Work\\Example\\build\\C:\\Work\\Example\\bin\\Exercise1.exe"}
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:23.277Z [debug] [main] Starting debugger with following configuration. {"workspace":"file:///c%3A/Work/Example","config":{"type":"cppdbg","name":"Debug Exercise1","request":"launch","cwd":"${workspaceFolder}","args":[],"MIMode":"gdb","miDebuggerPath":"C:/MinGW/bin/gdb.exe","setupCommands":[{"description":"Enable pretty-printing for gdb","text":"-enable-pretty-printing","ignoreFailures":true}],"program":"C:\\Work\\Example\\build\\C:\\Work\\Example\\bin\\Exercise1.exe"}}
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:23.312Z [debug] [cache] Reading CMake cache file c:/Work/Example/build/CMakeCache.txt
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:23.314Z [debug] [cache] Parsing CMake cache string
console.ts:137 [Extension Host] [CMakeTools] 2020-02-12T12:35:27.037Z [debug] [extension] [1399] cmake.debugTarget finished (returned undefined)

Platform and Versions

  • Operating System: Windows
  • CMake Version: 3.15.4
  • VSCode Version: 1.42
  • CMake Tools Extension Version: 1.3.0
  • Compiler/Toolchain: MinGW 17.1 (GCC 9.2.0) from nuwen (https://nuwen.net/mingw.html)

Other Notes/Information

@bobbrow bobbrow added bug a bug in the product Feature: debug/launch labels Feb 12, 2020
@Darky-Lucera
Copy link
Author

Darky-Lucera commented Feb 12, 2020

I have manually installed version CMake Tools 1.2.3 and I can Debug again

@luchongk
Copy link

Happens to me too with Windows, CMake 3.16.2 and Visual Studio 19. Rolling back to 1.2.3 also works for me too.

@bobbrow bobbrow added this to the 1.3.1 milestone Feb 18, 2020
@KoeMai
Copy link
Contributor

KoeMai commented Feb 19, 2020

I think there is an problem with the CMake FileAPI Driver. I guess the workaround until v1.3.1 is released, is to change back to ServerAPI by setting cmake.cmakeCommunicationMode toserverApi.

@sialiuk
Copy link

sialiuk commented Feb 19, 2020

I faced the same problem on windows with the msvc compiler using CMake FileAPI Driver.
I was able to fix it with a small change in src\drivers\cmakefileapi\api_helpers.ts line 130. You need to remove redundant paht.join here.

if (executable_path) {
    executable_path = path.normalize(path.join(build_dir, executable_path.path));
}

should be
executable_path = path.normalize(executable_path.path);

Visual Studio Professional 2017, version 15.9.19

@bobbrow
Copy link
Member

bobbrow commented Feb 20, 2020

@KoeMai is it expected that executable_path.path can be a relative path sometimes? Perhaps that is why there is a path.join here?

@KoeMai
Copy link
Contributor

KoeMai commented Feb 20, 2020

No, the first CMake 3.14rc based implementation had relative paths.
I think it is a relict, and there is no test for executable targets.

It is tested in Linux and windows with VS 2017 Community in combination with CMake 3.14.4 and CMake 3.16.2. I need a MinGW environment for the problem reconstruction.

@sialiuk Whar MSVC compiler do you use?

@KoeMai
Copy link
Contributor

KoeMai commented Feb 22, 2020

I checked the relative paths. In systems, it is necessary to concrete the build directory with the executable path. At the moment I do not see any difference between my windows environment to @Darky-Lucera .

-->cmake_file-api(7)

path
A string specifying the path to the file on disk, represented with forward slashes. If the file is inside the top-level build directory then the path is specified relative to that directory. Otherwise the path is absolute

KoeMai added a commit to KoeMai/vscode-cmake-tools that referenced this issue Feb 23, 2020
The artifact paths could be relative or absolute. The path type depends on the RUNTIME_OUTPUT_DIRECTORY.
bobbrow pushed a commit that referenced this issue Feb 24, 2020
* Fix problem #1067 - RUNTIME_OUTPUT_DIRECTORY

The artifact paths could be relative or absolute. The path type depends on the RUNTIME_OUTPUT_DIRECTORY.
@bobbrow bobbrow added the fixed (release pending) fixed in pre-release and is pending official release label Feb 24, 2020
@bobbrow
Copy link
Member

bobbrow commented Feb 25, 2020

Fixed in 1.3.1

@bobbrow bobbrow closed this as completed Feb 25, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: debug/launch fixed (release pending) fixed in pre-release and is pending official release IMPORTANT
Projects
None yet
Development

No branches or pull requests

6 participants