I'm currently taking the MIT course "Introduction to C and C++" and in the Data Structures and Debugging section, it discusses using Valgrind. However, I found out that Valgrind is only available for Linux/UNIX. Since I'm new to programming, I'm not really sure what Valgrind does or how to use it. I've heard of AddressSanitizerC++, which comes with Visual Studio, but I primarily use VSCode for my coding. I'm looking for an alternative to Valgrind that I can use on Windows, ideally one that works well with VSCode or even through CLI like gcc mingw64.
1 Answer
Have you considered using Windows Subsystem for Linux (WSL)? It's a lot easier to manage C++ development in a Linux-like environment rather than trying to tweak things on Windows. WSL allows you to run a Linux distribution on Windows without much hassle, so you could use Valgrind there without needing a full Linux setup. Plus, it integrates pretty well with VSCode!
You mean I should install Linux? I'm looking for a simpler solution, don't want to dive into another rabbit hole!