Keep loading tasks and rebuilding IntelliSense Index after opening a project

image
Today I opened a project but found that PlatformIO keeps loading tasks and rebuilding IntelliSense Index as this screenshot shows, and I can’t build the project. It was normal before. I wonder how to solve the problem. Thank you!

Already restarted VSCode?

Already been restarted but still the same. But it can load now, maybe there are some connection problems. Thank you.

Could you open PlatformIO Core (CLI) in VSCode and type pio run? It should pull all project dependencies. You will see where it sticks.

我遇到了同样的问题。
具体原因可能有所区别,我可以列出我解决的办法。
当我打开关于esp32cam项目时一直在加载任务,看起来是加载platformio可以执行的任务阻塞了(因为左上角的PROJECT TASKS为空)。
我使用pio命令执行pio run -t build
发现会被阻塞。
于是我关掉了vs code,便有了信息输出。


原来是在安装esp32的环境(虽然不知道什么时候需要重新安装了)
由于网络原因,下载总是失败,于是卡在这里很久。
我在中国使用了手机数据流量并通过wifi热点将网络共享给PC,获得了很快的下载速度,使得下载成功。
此后再次打开vscode,便成功了。
或许你可以试试关掉vscode,打开项目所在的目录,在这个目录用命令执行 pio run -t build看看发生了什么。