Unable to use intellisense - language server crashed 5 time in last 3 minutes

This may be a VS Code issue and not be related to PIO but perhaps someone here can provide some insight.

On my M1 MacBook Pro running Monterey 12.5 I have a VS Code workspace for ESP32 projects that continuously fails to start intellisense apparently due to the C/C++ Extension not successfully starting a language server. Various notifications appear like:

Connection to server got closed. Server will not be restarted.
Pending response rejected since connection got disposed Code: -32097
cpptools client: couldn’t create connection to server.
The language server crashed 5 times in the last 3 minutes. It will not be restarted.

I’ve disabled all other extensions, tried different C/C++ extension versions, reinstalled VS Code, reset intellisense database, rebuild PIO intellisense index and tried to find something unique in the workspace but all without satisfaction.

The ESP32 projects build and run okay.

Curiously a different workspace for STM32 projects does not have any problems.

Any thoughts are appreciated.

I did a search which turned up a number of hits which appear to be relevant.

Unfortunately the GitHub/Microsoft links are not opening for me at this time. Perhaps GitHub is down.

Anyway from what I can see in the previews, the intellisense database is possibly corrupt. It can be rebuilt but the instructions for that and not part of the preview, sadly.

HTH

Cheers,
Norm.

Thanks for the reply.

I had also searched using the error message text but didn’t find anything that worked to resolve the issue.

For now my workaround is to open the project folder directly rather than the VS Code workspace and intellisense will work (for the opened folder). Seems like something in my VS Code workspace is broke. I’ll likely try to just rebuild the workspace from scratch when time permits.

1 Like