Skip to content

Code prematurely exited when long running main.py executed #336

Description

@jt000

Please provide a clear and concise description of the bug along with logs

What are the steps to reproduce this issue?

  1. Upload the following main.py to a connected pico (note: must be a main.py so it's auto-executed by .sr)
import asyncio

async def main():
    print("Starting the test...")
    await asyncio.sleep(120)
    print("Done with the test")

if __name__ == "__main__":
    asyncio.run(main())
  1. Execute .sr in the terminal

What happens?

After executing for about a minute, the program is terminated with the message "Interactive Soft Reset finished".

What were you expecting to happen?

The program should continue without an abnormal termination.

Any logs, error output, etc?

No logs. Would be nice if there were... Took me a very long time to determine this was due to this VSCode extension

Any other comments?

Appears to be a timeout somewhere in the call to PicoMpyCom.getInstance().sendCtrlD(...)

Which version of MicroPico are you using?

1.28.0

Support info

Copy this from the Help -> Info/About -> Copy (Code -> About Visual Studio Code -> Copy on macOS) option in Visual Studio Code:

Version: 1.125.0
Commit: 93cfdd489c3b228840d0f86ec77c3636277c93ea
Date: 2026-06-15T22:24:03Z
Electron: 42.2.0
ElectronBuildId: 14159160
Chromium: 148.0.7778.97
Node.js: 24.15.0
V8: 14.8.178.14-electron.0
OS: Linux x64 6.1.0-48-amd64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions