I wish to debug a Linux C++ console application from VS2017, as in these tutorials:
Writing And Debugging Linux C Applications From Visual Studio Using The Windows Subsystem For Linux
targeting windows subsystem for Linux from visual studio
I have installed gdbserver and openssh-server in my WSL Ubuntu 16.04 installation, and sshd is running, but I cannot connect from VS2017.
When I try, I get the error 'Connectivity Failure. Please make sure the host name and port number are correct'.
Both the host name and port number are correct as far as I am concerned. I know that WSL is still Beta, so I am assuming the problem has something to do with WSL (I recently installed the Windows 10 Creators Update so it is at least up to date, but I was expecting ssh to work with CU). I'm using Windows 10 version 1703, Build 15063.250.
Update I got Visual Studio to connect to my Ubuntu VM, which proves that it works and the problem must be with Bash on Windows. Nothing works with incoming connections, but outgoing connections work as expected.
Has anyone else had problems with connecting to WSL from Visual Studio 2017 in this way?

