Vscode-cpptools: VSC c/c++ extension: using gcc/gdb/git from WSL on windows 10 Anniversary update

Created on 12 Aug 2016  Â·  12Comments  Â·  Source: microsoft/vscode-cpptools

  1. I have installed gcc, gdb, git on WSL (windows system for Linux), which is basically bash shell of Ubuntu.
  2. I have linked my windows-home-directory with WSL home directory.
  3. currently I write code in VSC (visual studio code), but use gcc, gdb (cgdb), git in WSL to compile and debug my code.

Please integrate C toolchain of WSL with VSC C/C++ extension.

Language Service debugger

Most helpful comment

  1. I am launching VsCode from outside the bash shell. Its launched as normal windows executable program.
  2. VsCode's console's integration with bash shell will help streamline the workflow. In your second question, are you talking specifically about gdb ? For the time being, I think setting breakpoints in VsCode and attaching to gdb session in bash shell (running in VsCode console) will be good enough.
  3. Yes I can use same functionality in Visual Studio as well (a. compiling C code files in WSL context, b. running gdb in WSL context while controlling breakpoints from visual-studio).
    As VsCode is lightweight, I prefer it for personal projects. Professionally I use Visual Studio.

All 12 comments

@rrciisc, I'd like to get a few more details about your request.
First, how are you launching VsCode? Are you launching from Windows or are you attempting to launch from the bash shell?
Second, are you requesting that we implement launch from VsCode, or would attach be good enough (for now, anyway)?
Finally, if this functionality were available in Visual Studio, rather than VsCode, would you use Visual Studio for the same workflow (launching and debugging C++ code in the windows subsystem for Linux?). If not, why not? We are always looking to improve all of our products. Thanks!

  1. I am launching VsCode from outside the bash shell. Its launched as normal windows executable program.
  2. VsCode's console's integration with bash shell will help streamline the workflow. In your second question, are you talking specifically about gdb ? For the time being, I think setting breakpoints in VsCode and attaching to gdb session in bash shell (running in VsCode console) will be good enough.
  3. Yes I can use same functionality in Visual Studio as well (a. compiling C code files in WSL context, b. running gdb in WSL context while controlling breakpoints from visual-studio).
    As VsCode is lightweight, I prefer it for personal projects. Professionally I use Visual Studio.

+1

+1

+1

+1

+1

+1

85 is tracking this issue. I have posted an update there. I will be closing this issue and updating that one when I have more information.

+1

+1

@Sheepwall If you look at #85, there is documentation that has been created to support this scenario. Please file a new issue if you are having problems.

Was this page helpful?
0 / 5 - 0 ratings