Sorry, My english is not very good.
I create a cmake project,
project(TestXXXX)
cmake_minimum_required(VERSION 2.5)
cmake_policy(SET CMP0003 NEW)
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
add_definitions(-std=c++14)
aux_source_directory(./src DIR_SRCS)
add_executable(TestXXXX ${DIR_SRCS})
target_link_libraries(TestXXXX pthread)
and open code root folder , can build but not debug,
click debug button is not respond
What version of CMake are you using? Type cmake --version at the command line.
cmake version 3.9.5
Target: x86_64-linux-gnu
Thread model: posix
gcc version 6.3.0 (Debian 9)
I change the cmake version to 3.12.0-rc2, but not solve this problem
@vector-of-bool @Emoer Hi,It seems that I have meet same problem. The Debug Target cannot select.
Click debug button is not respond
vscode version
Version: 1.25.0
Commit: 0f080e5267e829de46638128001aeb7ca2d6d50e
Date: 2018-07-05T13:10:37.273Z
Electron: 1.7.12
Chrome: 58.0.3029.110
Node.js: 7.9.0
V8: 5.8.283.38
Architecture: x64
cmake version
3.10.2
I have try this 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": true,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
then the output is:
No executable target was found to launch. Please check:
[main] - Have you called add_executable() in your CMake project?
[main] - Have you executed a successful CMake configure?
[main] No program will be executed
It seems that the Debug configure has some issue. but I can build the target too.
Hi,@huoyushi
I also have encountered the same tips when i have use launch.json.
Hello all,
I'll take a closer look and see if I can get this fixed in 1.1
This is closely related to #461, which will be fixed in 1.1.0. Clicking the debug button will prompt you for a selection in the next release.
Thank you very much.
Most helpful comment
Thank you very much.