Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception thrown during the configure process if CppTools's IntelliSense engine is disabled #11795

Closed
KRMisha opened this issue Dec 5, 2023 · 4 comments · Fixed by #11797
Closed
Assignees
Labels
bug Feature: Configuration Provider Related to the configurationProvider property, e.g. ms-vscode.cmake-tools, ms-vscode.makefile-tools. fixed Check the Milestone for the release in which the fix is or will be available. quick fix
Milestone

Comments

@KRMisha
Copy link

KRMisha commented Dec 5, 2023

If the ms-vscode.cpptools extension's IntelliSense engine is disabled (by adding "C_Cpp.intelliSenseEngine": "disabled" to settings.json), the VS Code Makefile Tools extension throws an exception during its configure process. This message shows up in the output panel:

Exception thrown during the configure process: Cannot read properties of undefined (reading 'ActiveClient')

Setting "C_Cpp.intelliSenseEngine": "disabled" is useful when using another extension for language support, notably vscode-clangd, while still retaining CppTools's other useful features such as debugging.

Here is the thrown extension's stack trace:

TypeError: Cannot read properties of undefined (reading 'ActiveClient')
	at Object.getActiveClient (/home/misha/.vscode/extensions/ms-vscode.cpptools-1.18.5-linux-x64/dist/src/main.js:55922:28)
	at CustomConfigurationProviderCollection.add (/home/misha/.vscode/extensions/ms-vscode.cpptools-1.18.5-linux-x64/dist/src/main.js:54821:44)
	at CppTools.registerCustomConfigurationProvider (/home/misha/.vscode/extensions/ms-vscode.cpptools-1.18.5-linux-x64/dist/src/main.js:62426:23)
	at MakefileToolsExtension.registerCppTools (<path-to-repo>/vscode-makefile-tools/out/src/extension.js:105:30)
	at async MakefileToolsExtension.registerCppToolsProvider (<path-to-repo>/vscode-makefile-tools/out/src/extension.js:66:9)
	at async <path-to-repo>/vscode-makefile-tools/out/src/make.js:1254:48
	at async Immediate.<anonymous> (<path-to-repo>/vscode-makefile-tools/out/src/util.js:845:32)
@gcampbell-msft
Copy link
Contributor

@KRMisha Thanks for letting us know! This seems like something that we should ensure doesn't break our configure process. Marking this as a bug and putting it in our backlog, thanks!

@gcampbell-msft gcampbell-msft added bug Feature: Configuration An issue related to configuring the extension or IntelliSense labels Dec 18, 2023
@gcampbell-msft gcampbell-msft added this to the On Deck milestone Dec 18, 2023
@gcampbell-msft
Copy link
Contributor

@sean-mcmanus Does this belong on the cpp-tools extension? It seems like it's an exception getting thrown inside of the cpptools registerCustomConfigurationProvider method. Thanks!

@sean-mcmanus sean-mcmanus transferred this issue from microsoft/vscode-makefile-tools Dec 20, 2023
@sean-mcmanus sean-mcmanus self-assigned this Dec 20, 2023
@sean-mcmanus sean-mcmanus modified the milestones: On Deck, 1.19.2 Dec 20, 2023
@sean-mcmanus sean-mcmanus added quick fix Feature: Configuration Provider Related to the configurationProvider property, e.g. ms-vscode.cmake-tools, ms-vscode.makefile-tools. and removed Feature: Configuration An issue related to configuring the extension or IntelliSense labels Dec 20, 2023
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Dec 21, 2023
@sean-mcmanus
Copy link
Contributor

@KRMisha Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.19.2

@KRMisha
Copy link
Author

KRMisha commented Jan 23, 2024

Thanks a lot!

@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Feature: Configuration Provider Related to the configurationProvider property, e.g. ms-vscode.cmake-tools, ms-vscode.makefile-tools. fixed Check the Milestone for the release in which the fix is or will be available. quick fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants