A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
VS Code Code Runner takes several seconds to run simple C programs on Windows
I am facing a delay when running simple C programs in Visual Studio Code on Windows.
My setup:
- Operating System: Windows 11
- Editor: Visual Studio Code
- Language: C
- Compiler: GCC (MinGW)
- Laptop: MSI Katana 15, Intel Core i7 13th Gen, 16 GB RAM
- I use the Code Runner extension to run my C programs.
Problem:
When I click the "Run Code" button in VS Code, there is a noticeable delay before my program starts producing output. This happens even with simple programs, such as a program that only prints "Hello Bhai!" to the terminal.
I measured the compilation time using PowerShell's Measure-Command command. Compiling my C program took approximately 0.21 seconds.
I also uninstalled and freshly reinstalled VS Code, but I still notice a delay when running programs.
I would like to understand whether the delay is caused by Code Runner, terminal startup, the GCC execution process, or another configuration issue.
What troubleshooting steps can I use to identify the exact cause of this delay?
Thank you.