1

I really like Microsoft's Visual Studio Code editor and I wonder how to configure it to compile and run C code.

1

1 Answer 1

1

You can use C/C++ for Visual Studio Code as it provides code editing, navigation, and debugging support for C and C++ code.

Unless you are sure that you already have a compiler installed, make sure to install a C/C++ compiler and debugger and check the documentation for more instructions!

Popular C++ compilers are:

To run your code, and unless you want to go through the hassle of manual configuration, you can use Code Runner

To run code:

  • use shortcut Ctrl+Alt+N
  • or press F1 and then select/type Run Code,
  • or right click the Text Editor and then click Run Code in editor context menu
  • or click Run Code button in editor title menu
  • or click Run Code button in context menu of file explorer

To stop the running code:

  • use shortcut Ctrl+Alt+M
  • or press F1 and then select/type Stop Code Run
  • or right click the Output Channel and then click Stop Code Run in context menu

You will also find more detailed instructions through the referenced links!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.