IntelliSense stuck at 'loading...' .A crash of the IntelliSense process was detected

IntelliSense stuck at ‘loading…’

Can’t continue working after multiple “Go to Definition”.

  • OS and Version: Windows 11_22000.739
  • VS Code Version: 1.69.0-insider
  • C/C++ Extension Version: v1.10.7
  • PlatformIO IDE Version: v2.5.0
  • Single project

Steps to reproduce

  1. New PIO project (STM32F103xx. Arduino)
  2. Open ‘./src./main.cpp’
  3. #include <Arduino.h>’
  4. #include <HardwareSerial.h>’
  5. Click ‘Arduino.h’ Go to Definition(F12)
  6. Back
  7. Click ‘HardwareSerial.h’ Go to Definition(F12)
  8. Back
  9. Click ‘Arduino.h’ Go to Definition(F12)
  10. Back
  11. Click ‘HardwareSerial.h’ Go to Definition(F12)
  12. Back …
  13. … (Multiple attempts)
  14. ‘Loading…’

Screenshots
20220702_164347

hey,

Have you resolved the problem? I got exactly the same issue like you.

I think this problem is caused by c/c++ extension, because the same issue also happens when I use c/c++ extension to edit a simple hello world c program.

In particular, everytime when I launched the vscode, the “go to definition” works fine at the beginning, but then, if I click “go to definition” more times, it always stucks (keeps loading all the time…)

I tried updating c/c+ extensions to 1.10.8 and platformio extension to 2.5.5, but the problem remain still.

Any hints or ideas would be appreciated.

Best regards,

Hey,

I divided into the problem a little bit more, and here are what I tried and my guesses.

I tried a simple “helloworld.c” fille and two platformio projects (black_stm32f407zg and esp32, both based on arduino framework) to see if “go to definition” works well. Those trials follow the same steps as you described, and it turns out that a) for helloworld.c, everything is fine; b) for esp32, it takes a little time to pup up the result; c) for stm32f407, the same thing happened as what you described.

Compared to helloworld.c, the esp32 takes more time to find the definitions because the project is more complicated as it includes a lot of external directoryies to search for definitions (check out the c_cpp_properties.json file in the .vscode folder under your project folder). On the other hand, it stucks for stm32f407 project, and I guess this is because there is something wrong in the management of the or in its auto-generated c_cpp_properties.json file that leads to infinite-searching of definitions (next time when your go to definition stucks, just open the Task manager and you will see the task “c/c++ intellisense server for visual studio code” running all the time.)

In conclusion, the functionality of intellisense is fine, and the problem is actually case-dependent:if you manage your project very well, then you should have np problem at all, otherwise, it stucks at some point… And since my project is created by platformio from the template, in that case, we can not modify the c_cpp_properties.json file, so there is nothing we can do to resolve the issue.

Best,