Skip to content

Getting Started: Visual Studio (WSL)

Wonsup Yoon edited this page Mar 21, 2024 · 4 revisions

Prerequisites

  • Install WSL. WSL 2 is not tested. We recommend Debian 10 or Ubuntu 20.04.
  • Install development tools in WSL.
sudo apt update && sudo apt install -y g++ gdb make ninja-build rsync zip
  • Install Visual Studio 2019. Other versions are not tested.
  • Install "Desktop development with C++" and "Linux development with C++" (including "C++ CMake tools for Linux") workloads using Visual Studio Installer.

Project setup

  1. Download and extract latest version.
  2. Open extracted folder via "Open a local folder" vs-1
  3. "Manage Configurations..."

vs-2

  1. Remove "x64-Debug" and add "WSL-GCC-Debug"

vs-3

  1. Save file

  2. Select yes to automatically download and install CMake vs-4

  3. Project setup complete vs-5

Build and run (see CLI document for target explanation)

Note

  1. Select target to run

vs-6

  1. Build and run selected target. (Open Linux Console Window via Debug > Linux Console) vs-10

Debugging

  1. Go to TCPAssignment.cpp and add a breakpoint vs-8
  2. Build and run to run debugger vs-9