Home > Back-end >  how do I run my code on cmd instead of vscode's internal terminal
how do I run my code on cmd instead of vscode's internal terminal

Time:12-04

everyone. I'm kind of new in this field. So bear with it. I'll try to be as specific as I can:

let's say when I run a code(c file) in VScode it runs that code on VScode's internal terminal..like this => VScode

but I want that code to run on my Window's CMD like "CodeBlocks" software. Like this => CodeBlocks

but I don't know how to do it in VScode. I mean, when I click on 'run' button it should execute that code on CMD. I tried many ways but it's not working. Help please and thanks in advance.

CodePudding user response:

VSCode has a built-in terminal. That is why in the first case(first image in your question) you see the output as it is. If you don't want to use the built in terminal provided by VSCode then i suggest you open a standalone/separate terminal. And then cd into the project you want to build/compile and then compile the program from there.

Basically, open a terminal externally then go(cd) to your workspace folder and finally compile and run in the external terminal.

  • Related