From 57c92e877c7fe122716ea8d67e884be5aa524114 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 19 Jan 2022 16:53:31 +0200 Subject: [PATCH] Respect disabling debugging server from platformio.ini --- HISTORY.rst | 1 + platformio/debug/config/base.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 759e36dc..6992470d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,6 +13,7 @@ PlatformIO Core 5 - Improved support for private packages in `PlatformIO Registry `__ - Improved checking of available Internet connection for IPv6-only workstations (`pull #4151 `_) +- Respect disabling debugging server from "platformio.ini" passing an empty value to the `debug_server `__ option 5.2.4 (2021-12-15) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/debug/config/base.py b/platformio/debug/config/base.py index bcafa8fd..db7ddfba 100644 --- a/platformio/debug/config/base.py +++ b/platformio/debug/config/base.py @@ -153,7 +153,14 @@ class DebugConfigBase: # pylint: disable=too-many-instance-attributes raise DebugInvalidOptionsError("Could not load a build configuration") def _configure_server(self): + # user disabled server in platformio.ini + if "debug_server" in self.env_options and not self.env_options.get( + "debug_server" + ): + return None + result = None + # specific server per a system if isinstance(self.tool_settings.get("server", {}), list): for item in self.tool_settings["server"][:]: