I am editing a number of custom libraries in the ‘lib’ directory in VSCode. With every line or sometimes a few keystrokes, PlatformIO pops the “PlatformIO Configuring Project …” in the lower right hand corner. Sometimes it even steals the cursor focus. After a while it eventually comes up with an error message about too many configuration tries and give up for 10 minutes. Any way to stop this behavior?
That doesn’t sound like something that would be caused just by editing files in the lib directory. Something else must be up.
Try hitting F1 (or ctrl-shift-p) and use Output: Show output channels...
then select PlatformIO: project configuration
to see what messages show up there.
Here is a video of the behavior.
Try this in a pio terminal to see if setting verbose output will help:
pio settings set force_verbose yes
Info: pio settings — PlatformIO latest documentation
I don’t think that will do anything though so check the files.autoSave
setting to see if that’s causing it.
Thanks RJ. I did autosave off and that stopped the messages. After fixing that issue a new one cropped up. Every time I compiled the “Rebuilding Intellisense index” message popped. This was annoying since it shifted the focus from Terminal to Output.
I took the nuclear option and uninstalled PlatformIO and VSCode. Hunted down every reference to platformIO and VSCode on the file system and deleted them.
Reinstalled just the VSCode extensions required for platformIO. I then reinstalled platformIO and only the platform I am currently working. So far, this seems to have fixed the issue. Fingers crossed.
Maybe it is just me but these later versions of platformIO VSCode extension seem to be getting more problematic and slower as they add features. The versions I used even 1 year ago were much more stable and fast.I wish I could go back. Definitely turning off auto-update. Install specific version only shows the current one.
Another thing you can do to track down settings problem is to use “Profiles” to create a new profile that’s completely blank:
That gives you a profile with all settings, extensions, etc all completely wiped so everything should be vscode default.
Then install whatever extension is acting up in the blank profile, see if it’s still acting up, then reintroduce more extensions, settings, or whatever bit by bit until the problem starts happening again. (Only problem is if you marked any settings as “apply to all profiles” then it won’t be completely blank and you’d have to possibly remove things from workbench.settings.applyToAllProfiles
.)
Editing settings in the text editor as JSON also helps because only things you’ve changed from the default should be listed if you’re looking at user settings. Similar with Workspace or Folder settings.
Thanks for the tip on Profiles. I have seen it but not used it. Probably time to start using it so if I change something or add a new extension, I can do more troubleshooting.