paulober / MicroPico

MicroPico (aka Pico-W-Go) is a Visual Studio Code extension designed to simplify and speed up the development of MicroPython projects for the Raspberry Pi Pico and Pico W boards.
https://marketplace.visualstudio.com/items?itemName=paulober.pico-w-go
Mozilla Public License 2.0
245 stars 24 forks source link

README.md could use section for beginners about common mistakes #196

Open Redsandro opened 5 months ago

Redsandro commented 5 months ago

Feature Request 🚀

Is your feature request related to a problem? Please describe.

I am a complete beginner with MicroPython and MicroPico on VSCode. I have been using VSCode for other purposes on Linux for years, everything running smooth and happy. Pretty vanilla with some language extensions for node and javascript. I switched to VSCodium last year, which is almost identical but without telemetry. I though I knew VSCode until I tried this MicroPico workspace extension.

After installing MicroPico, I'm running into all kinds of problems that I never had before, don't understand and can't resolve. I've obviously made some mistakes and I'm missing VSCode knowledge that I was able to do without until now.

  1. When I want to work on a project, I go into the folder and run code . Since MicroPico, VSCode opens twice. One time the project I want to open, and one time the test project I created for my Raspberry Pi Pico.
  2. I can see my device's files in the Raspberry Pi Pico project, but the terminal opens to my local tree. The Raspberry Pi Pico remote terminal opens on the second instance of VSCode. I can open one on the first instance, but it doesn't remember the next time.
  3. I get the popup to install Pylance or revert to Jedi every time. It doesn't matter what I choose, I keep getting the same popup.
  4. The status bar is alerting me to select an interpreter. It doesn't matter what I choose. The alert stays.
  5. Now something called ptyHost fileWatcher is constantly using 100% CPU as long as VSCode is open, making my laptop fan blow as if I'm doing a stress test, draining my battery. I don't know how to turn it off.

image

Describe the solution you'd like

I'd like the README.md to address beginner issues and common mistakes.

Describe alternatives you've considered

I have spend many hours searching for help, talking to Bard, talking to ChatGPT, getting nowhere. For now I have switched to Thonny, but it doesn't compare to VSCode.

Teachability, Documentation, Adoption, Migration Strategy

It would help the tinkerer relax their mind if they can start programming without having to deal with these issues first.

JPH-Botron commented 5 months ago

I agree with the above. Creating this entire extension had to be a major time sink in the first place, but without a better idea of how and what it does it loses most of its utility. The many web tutorials work, but nothing beyond a very simple single file example seems to be operational. I'm trying to handle a project with multiple .py files, and I have no idea if: (1, That isn't supported (2. It used to be supported, but not anymore (3. Supported, but you have to know the tricks to make it work. It's noteworthy that not a single tutorial talks about working with multiple files, although the code appears to have a significant chunk of filesystem support. In short, it looks like you've probably done a great job and put in a lot of effort, but without any real documentation, it loses most of its (probable?) value outside a very small circle.

vbakke commented 5 months ago

Totally agree. This is my first MicroPython project as well, and MicroPico has a few quirks, like when you change a library file.

I'd be happy to create a suggestion with multiple files, e.g. using the onboard led and temp sensor.

What would we need to highlight?

It needs to be short and simple. Yet show the essentials.

Redsandro commented 5 months ago

What would we need to highlight?

I just need to feel like I understand what is happening.

The immediate rivalry with epic battles fought out between two characters called Pylance and Jedi, one single click after installing MicroPico, is a bit overwhelming. And the question which one should rule the earth (There Can Only Be One) keeps popping up every time you start VSCode, regardless of the choice you make. Who are they? How can I shut them up? Eventually I removed all recommended extensions and the fight is finally over. VSCode still recognized Python just fine and even does basic code completion. I don't understand what just happened and what I'm missing, but my laptop no longer blows its fans like an airplane whenever I start VSCode.

Since installing MicroPico, VSCode opens two windows racing to connect to the Pico. I don't understand why. This seems buggy but I probably need to click a single option somewhere in VSCode settings or MicroPico settings or Workspace settings.

Every time I do this, I get MemoryError: Memory allocation failed, allocating 90000 bytes. 90k, that's a lot of memory for the Pico. I often have only 40k free. It can probably be configured to use less, but how? On Thonny IDE I get no such error.

vbakke commented 4 months ago

Hmm... I don't get any of these issues that you are describing here.
I just followed the MicoPico 'Getting Started' and it all worked fine. No Jedi. No double windows. And no memory error. Sorry.

Redsandro commented 4 months ago

I don't get any of these issues that you are describing

I just tried on a different machine with a different Pico. Same issues. Especially the two instances of VSCode opening is annoying and causes extra problems. I'm running v1.85.2 on Linux. Are you running VSCode on Linux?