From 3c36dc58b6ec189caeb34104eabcb801e482d447 Mon Sep 17 00:00:00 2001 From: mtnpke Date: Thu, 31 Jul 2025 10:36:48 +0200 Subject: [PATCH 1/2] Always hide console window on Windows In the case of Windows GUI applications, Popen may create a new (empty) terminal window. Explicitly set CREATE_NO_WINDOW flag so this never happens. It is ignored on POSIX operating systems. --- pygdbmi/gdbcontroller.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pygdbmi/gdbcontroller.py b/pygdbmi/gdbcontroller.py index d4fa59a..ebe76d9 100644 --- a/pygdbmi/gdbcontroller.py +++ b/pygdbmi/gdbcontroller.py @@ -90,6 +90,7 @@ def spawn_new_gdb_subprocess(self) -> int: self.gdb_process = subprocess.Popen( self.command, shell=False, + creationflags=subprocess.CREATE_NO_WINDOW, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE, From 953e1128237b55ba21a671d9084c4b80cac4b7f5 Mon Sep 17 00:00:00 2001 From: mtnpke Date: Thu, 31 Jul 2025 10:38:11 +0200 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc85ed6..41f8e34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## <0.11.0.1>.dev0 -- *Replace this line with new entries* +- Alwyays hide gdb console window on Windows. ## 0.11.0.0