microsoft / microsoft/vscode-cpptools

IntelliSense in 1.26.3: Makefile Tools configuration ignored, falling back to default configuration

Open
#13,840 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug Feature: Configuration Provider Language Service regression
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Environment
  • OS and Version: Debian GNU/Linux 12 (bookworm)
  • VS Code Version: 1.103.0
  • C/C++ Extension Version: 1.26.3
  • If using SSH remote, specify OS of remote machine: Debian GNU/Linux 10 (buster)

I am using Debian 12 and attach VS Code to a container running Debian 10 (using Dev Containers extension)

Bug Summary and Steps to Reproduce

Bug Summary:

When using VS Code Makefile Tools (v0.12.7) as the configuration provider for C++ Tools, running Makefile: Clean Configure works as expected with C++ Tools v1.25.3. The extension correctly receives and applies the configuration provided by Makefile Tools:

Sending configuration for file <filePath> -----------------------------------
Sending configuration for file <filePath> -----------------------------------
Sending configuration for file <filePath> -----------------------------------

However, starting from C++ Tools v1.26.3, although the configuration messages are still sent, they are followed by a large number of warnings:

Configuration for file <filePath> was not found. CppTools will set a default configuration
Configuration for file <filePath> was not found. CppTools will set a default configuration
Configuration for file <filePath> was not found. CppTools will set a default configuration

In this state, C++ tools falls back to using the compiler in /usr/lib/gcc and only sets the project’s root folder as an include path, ignoring the include paths and defines provided by Makefile Tools.

Switching to the pre-release version of Makefile Tools and C++ Tools does not resolve the issue. However, the <filePath> not found error is not showing up when pre release version of C++ Tools is installed (1.27.0)

Expected Behavior

C++ Tools should honor the configuration provided by Makefile Tools, as it did in v1.25.3, ensuring all required include paths and defines are applied.

Configuration and Logs
I do not use c_cpp_properties.json, but a single .code-workspace file.


{
	"settings": {
		"editor.tabSize": 2,
		"editor.detectIndentation": false,
		"editor.insertSpaces": false,
		"makefile.configureOnOpen": false,
		"makefile.configureOnEdit": false,
		"makefile.makeDirectory": "${workspaceFolder}/Build",
		"makefile.extensionLog": "${workspaceFolder}/Output/makefile.log",
		"C_Cpp.default.configurationProvider": "ms-vscode.makefile-tools",
		"C_Cpp.default.mergeConfigurations": true,
		"makefile.configureAfterCommand": false,
		"makefile.alwaysPreConfigure": true,
		"makefile.preConfigureScript": "${workspaceFolder}/../../Scripts/config_vscode_intellisense.sh",
		"makefile.postConfigureScript": "${workspaceFolder}/../../Scripts/post_config.sh",
		"makefile.ignoreDirectoryCommands": false,
		"makefile.configurations": ["<MY CONFIGURATIONS HERE>"],
		"C_Cpp.errorSquiggles": "enabled",
	},
	"folders": ["<MY FOLDERS HERE>"]
}
Other Extensions

Makefile Tools (v0.12.7)
Dev Containers (v0.422.1)

Additional context

It is a large commercial project I am working on, so I am unable to provide thorough details. However, I am willing to try some things or potentially create a simple reproducible scenario.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the C_Cpp.default.configurationProvider and C_Cpp.default.mergeConfigurations settings in the supplied .code-workspace file, then compare the Makefile: Clean Configure logs between C++ Tools v1.25.3 and v1.26.3. Reproduce the missing configuration warnings if possible; done means Makefile Tools include paths and defines are honored instead of the default compiler and root include path.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript, vscode
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.