PlatformIO Community

PIO, VSC can't build, no tasks found

I’ve been away for a few days. I just did the downgrade to 1.39.2 (used .deb file on Ubuntu 19.04) and I am now able to build and upload. Thanks!

Also spent hours for research restoring a working platform using ESP32 after my desaster of stupidly pressing the button following their recommendation ‘disable java for typescript’ etc. just what Cryptocacher remarked.
Neither v1.40.0 nor 1.40.1 are working, getting same issue “No tasks to run found…click on configure…”, no matter what you do: PlatformIO reinstall, VSCode reinstall, deletion of sources etc.

Solution/Workaround:
Reinstall VSCode Version 1.39.2.
Using Windows 7

Thanks drmarco! ))

How do I stop VSC from updating?

I install 1.39, then go set no updates in preferences, then when I restart it F’n updates to 1.40! :face_with_raised_eyebrow:

Probably need to disable your internet after you’ve installed VSCode, and disable updates before re-enabling your internet. Otherwise in the time you’ve opened VSCode and navigated to the updates preference setting it’s probably already checked and downloading/downloaded the update.

Alternately, edit your settings.json to include "update.mode": "none" before opening VSCode that first time should fix it.

Depending on your platform, the user settings file is located here:

  • Windows %APPDATA%\Code\User\settings.json
  • macOS $HOME/Library/Application Support/Code/User/settings.json
  • Linux $HOME/.config/Code/User/settings.json

As a side note, I also momentarily got this issue with either 1.40.0 or 1.40.1, but it went away as soon as I opened a new workspace, so it isn’t strictly a “1.40.0 won’t work” issue… IIRC, I’ve also seen this occasionaly with earlier VSCode versions. I’m currently running VSCode 1.40.1 on both Windows and Linux, and both are working fine… and have alternated between both OSs in the last few days…

Setting that offline didn’t make any difference. It stayed set until I rebooted the machine, then the first time I started VSC it automagically upgraded to 1.40.

1.40.x says No tasks to run.

I don’t see any menu selection for a New Workspace. The explorer in VSC shows one workspace with the header "UNTITLED (WORKSPACE) and it has (platformio) projects I’ve opened. (I’m sure this is my lack of understanding workspaces in VSC…so, I’d love to know more. :blush:

How rude! Bad VSCode for not doing what it’s told! (I hope you meant none then, as offline isn’t a valid option)

Nope (or if I give the VSCode devs the benefit of the doubt, sort of)… it’s more that it’s not as intuitive as you’d think. If you do File -> New Window… then a new window is opened, with no workspace loaded… hence a new workspace! :confounded: Then you can do File -> Add Folder to re-add your project to the new window, and see if it behaves itself now. The workspace remains ‘untitled’ until you do File -> Save Workspace As, which makes a small text file listing all the folders you have open in the workspace. Handy for when you have several related projects open at one, and want to save those groupings.

Well, in a word…nope.

  • if I install 1.39, get update set to none or manual, then it stays at 1.39 for that boot. If I then reboot, open VSC, it auto updates to 1.40.x

  • Opening a new workspace as you describe, adding a project (any project)…attempts to build fail with no tasks.

  • at this point every morning I reinstall 1.39 after reboot. :frowning_face: annoying.

(Edit: and, every time I do the install it crashes Whisker menu and I have to reboot from the command line. grr… :confounded: ) (Edit: amend that to sometimes it clobbers Whisker…)

Now 1.39 has just started this every time I attempt to build, upload, whatever:

PlatformIO: Intellisense Index Rebuild

1 Like

Oh derp… I completely missed that you’re on Linux. Ok, on Linux, VSCode doesn’t manage updates, it leaves that to your package manager, so you’re probably fighting with apt/unattended-upgrades on this front. You’ll want to have apt hold the package version for code… i.e. sudo apt-mark hold code, and then sudo apt-mark showhold to check that it took. If you want it to update again sudo apt-mark unhold code will release it.

PlatformIO: Intellisense Index Rebuild is actually promising… it’s suggesting the VSCode extension is trying to process the projets platformio.ini, update IntelliSense, and install any packages (libraries, toolchains) needed if possible. Still getting no task failures though?

edit: just saw your other thread… not sure what’s going on there now… have a look in the Help -> Open Process Explorer … is there a python task running? Maybe the python executable is being used or something like that…

e.g.

Aha! :open_mouth:

I have unattended-upgrades disabled. But, I do an apt update/upgrade every day because I use the daily build of FreeCAD. And, having no clue the package for VSC is called “code” it didn’t register to me that it was being upgraded.

Thanks for that! :grinning:

Don’t know what was up with the Intellisense thing…it just stopped being weird after an hour or so. :roll_eyes:

1 Like

Yeah, VSCode is a bit sneaky that way… they couldn’t call the package vscode, now could they?! :open_mouth:

A few things are happening when the IntelliSense rebuild message is shown… including installing library files, missing toolchains, etc. Maybe it was having trouble doing that.

The same happened to me. Now, i’m here looking for solutions

Thanks. The sudo apt-mark hold code worked for me too (I was also getting the unwanted updates). Well, we’ll see… it is working for now at least :slight_smile:

All the best

2 Likes

thanks @lcerda , from your answer the complete provisional workaround is:

sudo apt-get remove code --purge
sudo apt-get install code="1.39.2-1571154070"
sudo apt-mark hold code

works fine with Debian 10.

Okay, I ran into the same issue today on Windows 10.
I’ve uninstalled VSC, deleted .platformio and .vscode from my user directory. I deleted .vscode and .pio from my project directory. I’ve reinstalled VSC x64 1.40.2 (System setup). Reinstalled PlatformIO, opened my project folder in VSC and… still got the isse :frowning:
I’ve then installed VSC on an other Windows 10 PC, copied my project, installed PIO and the tasks worked fine.
I may have also clicked the disable typescript button…
How do I solve the issue? Downgrading is not an option…

Okay, solved the issue:

CTRL+Shift+P: Preferences: Open Settings (JSON)
or
Open %user%\AppData\Roaming\Code\User\settings.json (missed that during reinstall)

Delete "task.autoDetect": "off"

I have no idea how it got there…

18 Likes

Oh god, thank you. You’ve saved me hours of pain, cause my deadline is in two days :slight_smile:

2 Likes

Just some more data points.

I tried what @XSRF recommended with CTRL+Shift+P with 1.39

  • running on the Ubunt 19.04 system that I started this thread with.
  • that opened up an editor with the json and I deleted "task.autoDetect": "off"
  • closed VSC
  • installed 1.40, started VSC
  • tried CTRL+Shift+P (but it showed the preferences tab as if I’d clicked File>Preferences…)
  • couldn’t find any sign of the task.autoDetect
  • attempted to build my code as usual
  • builds fine.

On a different PC running Ubuntu 19.10, that had no prior install of VSC, I installed VSC 1.40 from scratch.
Build worked fine first try…

2 Likes

just come here to say thank you. saved my night :slight_smile:

1 Like

Thank you!
One more thing, maybe related. At least, disappearing-tasks problem appeared when ms-vscode.cpptools extension self-switched to “insiders” channel (maybe, i clicked “update”, but not sure, anyway - ms-vscode.cpptools want to switch to “insiders”, because when i switched it back to “default” it ask me to swith to “insiders” again, but i have rejected, of course).
And, seems like, this “insiders” “damaged” something else (inluding build tasks of PIO)

2 Likes