VSCode stuck on "Starting Build...."

Viewed 629

I use VSCode along with gcc to compile C code. I was using the same launch.json and tasks.json file last week too but it no longer compiles since today; it's stuck on "Starting Build..."

However, if I paste the command under "Starting Build..." directly to the terminal, the compiled binary is indeed created.

I got no help in Googling.

Please have look at this

karthik@cosmic:~$ code --version
1.66.2
dfd34e8260c270da74b5c2d86d61aee4b6d56977
x64
karthik@cosmic:~$ uname -osr
Linux 5.16.19-76051619-generic GNU/Linux
2 Answers

After opening an issue at Github, it was informed that this was a bug with the latest version of VSCode as of 02nd May 2022 and they're already on fixing it

A possible work-around for now is ensuring there's no spaces in directory names and file names in your project workspace; thus update the tasks.json and launch.json too with the same.

More info here

I also faced the same issue, but on visiting your issue on GitHub and #9421 I noticed that the issue was due to the new version of the C/C++ extension. Just try to downgrade the version back to 1.9.8 (the latest version is 1.10.7, period).

This workaround worked for me and the code compiled in the latest version of VS code, 1.68.1, period.

(Note that I also had spaces in my folder names. So, I tweaked tasks.json by adding inverted commas for the file path.)

  • OS-Windows 10

  • VS code-1.68.1

  • GCC version(MSYS2)- 11.2.0

Related