How should I properly set up my C/C++ environment in Visual Studio Code?

0
9
Asked By CuriousCoder92 On

I've been programming for a while now, even before starting my degree, but I never really got a solid grasp on using Visual Studio Code. Now that I'm in my junior year, I'm feeling a bit confused about my setup. I've been using VSCode for about a year, and while I can get my code to run, I'm not sure I'm doing everything correctly.

Two things I'm unsure about are my C/C++ environment setup and the role of a debugger. I primarily code in C and C++ and I just hit "compile and run" to execute my code. I've seen some tutorials mention a dropdown menu that should appear when you try to run your code, but I don't have that. I only see options for C/C++ compile and run, run code, and C/C++ debug. Does this mean I'm still able to run my code properly?

As for debuggers, I don't know much about them. I usually program for Arduino using PlatformIO and its built-in tools. I've never really found a reason to use a debugger in my projects. Is it essential for me to use one?

1 Answer

Answered By TechSavvyExpert On

Honestly, if your code is running without any issues, then you might not need to worry too much about using a debugger right now. Many developers only use it when they're troubleshooting tricky bugs. If you’re just starting out and your programs are functioning as expected, just keep doing what works for you!

CuriousCoder92 -

That's good to hear! But do you think I'll ever need to use a debugger, especially since I've never had any professors hint at their importance? I understand they help you step through your code instead of relying on print statements. I'm mainly working on robotics and Arduino stuff, so is it really necessary?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.