https://github.com/yusufss4/c-cpp-multi-file-structure-for-wsl
With this template it is possible to debug the C/C++ application through Visual Studio Code with WSL using Windows.
https://github.com/yusufss4/c-cpp-multi-file-structure-for-wsl
cpp vscode wsl
Last synced: about 1 month ago
JSON representation
With this template it is possible to debug the C/C++ application through Visual Studio Code with WSL using Windows.
- Host: GitHub
- URL: https://github.com/yusufss4/c-cpp-multi-file-structure-for-wsl
- Owner: Yusufss4
- Created: 2022-06-18T16:36:35.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-18T16:44:43.000Z (about 4 years ago)
- Last Synced: 2025-03-02T01:31:01.719Z (over 1 year ago)
- Topics: cpp, vscode, wsl
- Language: Makefile
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Introduction
With this template it is possible to debug the C/C++ application through Visual Studio Code with WSL using Windows.
# Steps
1. First download WSL using this tutorial and continue from that. https://docs.microsoft.com/en-us/windows/wsl/setup/environment (No need to set the terminal.)
2. Later use the tutorial named VsCode in WSL -> https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-vscode
3. Use that tutorial to install Git for WSL -> https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-git
4. Than use this tutorial to install required extensions/apps for C/C++ development and configs -> https://code.visualstudio.com/docs/cpp/config-wsl
5. Follow this tutorial for the C/C++ debugging in the Visual Studio Code -> https://dev.to/talhabalaj/setup-visual-studio-code-for-multi-file-c-projects-1jpi
In the end of the step 5 you will have exact files / or you can just directly download the files from here instead of doing the step five.
# End
Now you can press F5 for debugging the C/C++ application that runs in WSL.
# Note
## Executible File Name
Note that in the launch.json file; \
`"program": "${workspaceFolder}/bin/main",` \
You can change the executible file name by changing the "main". \
Also you need to change the name from the make file in the code below. \
`EXECUTABLE := main`
## Doesnt work on W10/W11 without WSL.
This configurations are only working on WSL or Linux.