Skip to content

Commit 3473869

Browse files
committed
pyinstaller
1 parent 97537bf commit 3473869

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

helpers/USB_SerialPortMonitor.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,17 @@ def on_thread_debug_init(self) -> None:
211211

212212
def ensure_debugger_attached(self) -> None:
213213
"""Enable debugpy tracing for this QThread (idempotent)."""
214+
215+
# If running as a PyInstaller EXE → disable debugpy entirely
216+
import sys
217+
if getattr(sys, "frozen", False):
218+
return
219+
220+
# Only enable when developer explicitly requests it
221+
import os
222+
if os.getenv("SERIALUI_DEBUGPY", "0") != "1":
223+
return
224+
214225
if self.debug_initialized:
215226
return
216227
try:

0 commit comments

Comments
 (0)