Vscode-cpptools: Extension does not create 'tasks.json' unless the '.vscode' directory already exists

Created on 20 Sep 2019  Â·  6Comments  Â·  Source: microsoft/vscode-cpptools

Type: General

  • OS and Version: Arch Linux
  • VS Code Version: Code-OSS 1.37.1
  • C/C++ Extension Version: 0.25.1

When I open a folder in VS Code that does not yet have a .vscode folder in it, and follow the steps to create a configuration file for debugging (as outlined in #4278), the extension creates the file launch.json inside a newly-created .vscode folder, but it does not create the file tasks.json. Because of that, when trying to start debugging, this error appears:

Could not find the task 'g++ build active file'.

But if I go and delete the launch.json file, without deleting the .vscode folder, and perform the same steps again, everything works.

Additional context
The only files I have in the folder (initially) are a couple of _.cpp_ files and their binaries.

Language Service bug builtasks fixed (release pending) help wanted

All 6 comments

Yeah, we should probably do a bug cleanup pass on the build tasks stuff we added a few months ago...I'm not sure yet when we'll have time on our schedule. The build/tasks stuff is in our open source TypeScript if anyone wants to investigate a fix themselves.

This is still happening on April 2020. If I remove launch.json without deleting .vscode folder (or just create it from the beginning) everything works perfectly.

@herrera-ignacio Yes, it was never fixed.

There was a bug on Linux/Mac for 0.30.0-insiders5, but that is fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/1.0.0 .

Was this page helpful?
0 / 5 - 0 ratings