This specific detail was not called out in the steps, and there was a mismatch in these files auto-generated by the config. Basically, VS Code defines the debug configuration in the file launch.json which includes a setting named preLaunchTask whose value should match the name of the task in the file tasks.json. It goes on to explain the next step of debugging the code, which opened up one of the rabbit holes for me because of a subtle nuance in the description. The article explains how to write a simple C++ program ,compile and run it from within VS Code using the tasks.json config file. Good news is that Clang is already available on my machine as part of the Xcode toolchain.Ĭonfiguring VS Code to use Clang is described well in this official documentation, almost - except one thing. Note that this extension does not include the compiler and debugger, so we need to install them on our own and configure the extension to use them. The first step is to install the C/C++ extension for VSCode, which was pretty straight-forward as described in VS Code instructions. My goal is to configure Visual Studio for Mac for C++. I decided to read this book and learn from it. Why, you may wonder - for the past few months, I have been craving to learn something different and I was hooked when I saw the book Data Structures and Algorithms in C++ by Adam Drozdek. The task at hand is to set up Visual Studio for Mac to compile/run/debug C++ programs. After a long time, I got the time to tinker with something fun and learn from it, thanks to the week-long break from work.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
February 2023
Categories |