microbit-foundation / python-editor-v3

Micro:bit Educational Foundation Python Editor V3
https://python.microbit.org
MIT License
57 stars 36 forks source link

[Serial] Connection is reset when switching focus #853

Open florenthemmi opened 2 years ago

florenthemmi commented 2 years ago

Bug Description

The connection is reset when switching focus (changing tab or window for example). It is a pain to debug something.

How To Reproduce

Steps to reproduce the behavior:

  1. Click on "Show serial"
  2. Type something: "import sys"
  3. Change tab
  4. Module "sys" is not loaded anymore (micro:bit has reset) and all the content is cleared

Expected behavior

Same behavior from previous version: https://python.microbit.org/v/2. Please note that on the old version the serial is closed only when clicking on the button "Close Serial".

Environment

Desktop:

microbit-matt-hillsdon commented 2 years ago

Thanks @florenthemmi. This is a known issue due to a workaround for https://github.com/microbit-foundation/python-editor-next/issues/89. We'd love to fix this in future.