Description
Brief Issue Summary
From the following page:
https://code.visualstudio.com/docs/cpp/cmake-linux#_create-a-cmake-hello-world-project
after completed all steps, Start DEBUG produces the following errors:
The program '/home/christian/code/cpp/testconst2/build/testconst2' has exited with code 42 (0x0000002a).
ERROR: Unable to start debugging. Unexpected GDB output from command "-interpreter-exec console "set env COMP_WORDBREAKS
"'><=;|&("". Problem parsing arguments: interpreter-exec console "set env COMP_WORDBREAKS
Here is what I've done:
1/ Check environment
11:48:08 |base|christian@ryzen testconst2 → cmake --version
cmake version 3.16.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
11:50:03 |base|christian@ryzen testconst2 → gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu120.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-yTrUTS/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu20.04)
Thread model: posix
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1
2/ Create a CMake project
mkdir cmakeQuickStart
cd cmakeQuickStart
code .
3/ Create a CMake hello world project
Here is cmakelists.txt
cmake_minimum_required(VERSION 3.0.0)
project(quickStart VERSION 0.1.0)
include(CTest)
enable_testing()
add_executable(quickStart main.cpp)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
4/ Configure helloWorld
Done - no issues
5/ Select variant
Debug selected - no issue
6/ CMake configure
Done - no issues
7/ Build hello world
Done - No Issues
[main] Building folder: cmakeQuickStart
[build] Starting build
[proc] Executing command: /usr/bin/cmake --build /home/christian/code/cpp/cmakeQuickStart/build --config Debug --target all -j 18 --
[build] Scanning dependencies of target quickStart
[build] [ 50%] Building CXX object CMakeFiles/quickStart.dir/main.cpp.o
[build] [100%] Linking CXX executable quickStart
[build] [100%] Built target quickStart
[build] Build finished with exit code 0
8/ Debug hello world
In the console log:
ERROR: Undefined command: "". Try "help".
The program '/home/christian/code/cpp/cmakeQuickStart/build/quickStart' has exited with code 42 (0x0000002a).
I found the following in another window:
The program '/home/christian/code/cpp/cmakeQuickStart/build/quickStart' has exited with code 42 (0x0000002a).
ERROR: Unable to start debugging. Unexpected GDB output from command "-interpreter-exec console "set env COMP_WORDBREAKS
"'><=;|&("". Problem parsing arguments: interpreter-exec console "set env COMP_WORDBREAKS
Any help?