I tried out this exercise: how does VSCode integrate with WSL and the GNU toolchain? it turns out that this is straingtforward. Assumption is that you have VSCode installed, and have a WSL with a C++ toolchain (I have an Ubuntu with GCC) and GDB.
There are only a few steps required. You
- install the VSCode Remote Development extension,
- connect to a WSL share
- install C++ Extension
- create a cpp source file.
- run it
It's that simple to get started. I had buckled up for a difficult experience, but this worked right away.