I am trying out Targeting the Windows Subsystem for Linux from Visual Studio. The project builds fine in Visual Studio:
1>------ Rebuild All started: Project: LinuxConsoleApp, Configuration: Debug x64 ------
1>Cleaning remote project directory
1>Validating architecture
1>Validating sources
1>Copying sources remotely to 'localhost'
1>Starting remote build
1>Compiling sources:
1>main.cpp
1>Linking objects
1>LinuxConsoleApp.vcxproj -> C:\...\LinuxConsoleApp\bin\x64\Debug\LinuxConsoleApp.out
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
I can run it from the bash commandline prompt on Windows:
linux@windows-bash:/mnt/c/.../LinuxConsoleApp/bin/x64/Debug$ ./LinuxConsoleApp.out
hello from LinuxConsoleApp!
However, when I set a breakpoint to debug it from Visual Studio, I got error:
"Could not launch gdb. gdb is missing from your system and needs to be installed, please use your system's package manager to install it"
I did install gdbserver on the Linux subsystem on Windows. Does anyone know what else I need to make it work? Thanks in advance!