Код Visual Studio не отображает локальные переменные для автозаполнения (проблема IntelliSense) после автоматического обC++

Программы на C++. Форум разработчиков
Ответить Пред. темаСлед. тема
Anonymous
 Код Visual Studio не отображает локальные переменные для автозаполнения (проблема IntelliSense) после автоматического об

Сообщение Anonymous »


I am facing issues with Visual Studio Code auto-completion not properly working after latest update (February 2024). I am using MacOS (M1) Monteray

To fully illustrate the problem, acqually I was having this problem since the first time I used VS code (using the configuration file reported below). Then after December 2023 update, auto-completion was automatically fixed (without any modification to the configuration file). Now, starting from a few days ago, after the latest VS Code update, I have the same problem I had before.

Here I copy-paste my whole configuration file (settings.json but I'm censoring the actual paths).

{ "editor.fontSize": 14, "terminal.integrated.fontSize": 14, "window.restoreWindows": "none", "editor.defaultFormatter": "esbenp.prettier-vscode", "C_Cpp.autocomplete": "default", "C_Cpp.default.compilerPath": "~/CENSORED", "C_Cpp.default.includePath": [ "~/CENSORED", "~/CENSORED", "~/CENSORED" ], "C_Cpp.default.intelliSenseMode": "gcc-arm64", "[cpp]": { "editor.defaultFormatter": "ms-vscode.cpptools" }, "editor.renderWhitespace": "all", "editor.minimap.enabled": false, "C_Cpp.intelliSenseEngineFallback": "enabled", "C_Cpp.autocompleteAddParentheses": true, "[c]": { "editor.defaultFormatter": "ms-vscode.cpptools" }, "[python]": { "editor.formatOnType": true }, "workbench.colorTheme": "Default Dark+", "window.zoomLevel": 1, } I'm using C++. The problem occurs when i include the headers of interest. Without headers, using these settings I correctly see suggestions for completion (also for local variables), while as soon as I include an header, (e.g. include ), local variables are not suggested any more (I see only suggestions for functions, global variables and const local variables ).

I tries modifying the settings.json file (without any success)

Edit 1: I'm using C++. The problem occurs when i include the headers of interest. Without heasers, using these settings I correctly see suggestions for completion (also for local variables), while as soon as I include an header, (e.g. "include ), local variables are not suggested any more (I see only suggestions for functions, global variables and const local variables ).

I have enabled the following C/C++ extensions:

C/C++ v1.19.4

C/C++ Extension Pack v1.3.0

C/C++ Themes v2.0.0

Here is a basic test to reproduce my problem:
#include int test = 0; void myFunc() { printf("aaa\n"); } void main() { int check = 10; // Autocompletion does not suggest check with #include // but it suggests it by commenting #include int autocomplete = che... // myFunc and test are correctly suggested both with and without #include }

Источник: https://stackoverflow.com/questions/780 ... tellisense
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение
  • Visual Studio не отображает меню «Локальные устройства Android»
    Anonymous » » в форуме Android
    0 Ответы
    7 Просмотры
    Последнее сообщение Anonymous
  • Visual Studio не отображает меню «Локальные устройства Android»
    Anonymous » » в форуме Android
    0 Ответы
    20 Просмотры
    Последнее сообщение Anonymous
  • Visual Studio Code не отображает список пакетов автозаполнения для подушки/пилона
    Anonymous » » в форуме Python
    0 Ответы
    1 Просмотры
    Последнее сообщение Anonymous
  • Visual Studio для Mac не отображает C# intellisense для новых добавленных пакетов nuget
    Гость » » в форуме C#
    0 Ответы
    55 Просмотры
    Последнее сообщение Гость
  • Visual Studio для Mac не отображает C# intellisense для новых добавленных пакетов nuget
    Гость » » в форуме C#
    0 Ответы
    43 Просмотры
    Последнее сообщение Гость

Вернуться в «C++»