How does code work without getting compiled or interpreted

compileride

I recently started researching about coding, but there are a few things that made me confused. I chose Visual Studio Code to start coding in C and Python (I was using IDLE for Python before), but afterwards I learned that Visual Studio Code does not contain compiler or other components that I don't know what they do, so it's not an IDE, although it works for code that needs to be compiled or interpreted.

It's said that it's just an editor. But it works for both interpreted and compiled languages. I'm confused: Should I use Visual Studio instead?

Best Answer

Compilers aren't magic - they're just programs, which can be run from the command line. Visual Studio Code has a "Terminal" tab in the bottom pane of the default UI, where you can invoke the compiler. (For non-trivial applications, you probably wouldn't be running the compiler directly, but would instead be running some software that also handles linking and other stuff; in a Linux-style environment that might be make, or ant for Java.)

But retyping the compiler invocation gets old pretty quickly, so Visual Studio Code has some shortcuts available. In the "Terminal" menu there are entries for "Run Task" and "Run Build Task" - if you select one of these, Visual Studio Code will present you with any auto-detected tasks it can come up with from what your project looks like.