mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 18:17:13 +02:00
Fix issue when disabling "debug_init_break" did not work
This commit is contained in:
@ -120,8 +120,9 @@ def cli(ctx, project_dir, project_conf, environment, verbose, interface, __unpro
|
||||
rebuild_prog = helpers.is_prog_obsolete(
|
||||
debug_config.program_path
|
||||
) or not helpers.has_debug_symbols(debug_config.program_path)
|
||||
else:
|
||||
rebuild_prog = not os.path.isfile(debug_config.program_path)
|
||||
|
||||
if not (debug_config.program_path and os.path.isfile(debug_config.program_path)):
|
||||
rebuild_prog = True
|
||||
|
||||
if preload or (not rebuild_prog and load_mode != "always"):
|
||||
# don't load firmware through debug server
|
||||
|
@ -88,7 +88,12 @@ class DebugConfigBase: # pylint: disable=too-many-instance-attributes
|
||||
|
||||
@property
|
||||
def init_break(self):
|
||||
result = self.env_options.get("debug_init_break")
|
||||
missed = object()
|
||||
result = self.env_options.get("debug_init_break", missed)
|
||||
if result != missed:
|
||||
return result
|
||||
else:
|
||||
result = None
|
||||
if not result:
|
||||
result = self.tool_settings.get("init_break")
|
||||
return result or ProjectOptions["env.debug_init_break"].default
|
||||
@ -196,13 +201,14 @@ class DebugConfigBase: # pylint: disable=too-many-instance-attributes
|
||||
raise NotImplementedError
|
||||
|
||||
def reveal_patterns(self, source, recursive=True):
|
||||
program_path = self.program_path or ""
|
||||
patterns = {
|
||||
"PLATFORMIO_CORE_DIR": get_project_core_dir(),
|
||||
"PYTHONEXE": proc.get_pythonexe_path(),
|
||||
"PROJECT_DIR": self.project_config.path,
|
||||
"PROG_PATH": self.program_path,
|
||||
"PROG_DIR": os.path.dirname(self.program_path),
|
||||
"PROG_NAME": os.path.basename(os.path.splitext(self.program_path)[0]),
|
||||
"PROG_PATH": program_path,
|
||||
"PROG_DIR": os.path.dirname(program_path),
|
||||
"PROG_NAME": os.path.basename(os.path.splitext(program_path)[0]),
|
||||
"DEBUG_PORT": self.port,
|
||||
"UPLOAD_PROTOCOL": self.upload_protocol,
|
||||
"INIT_BREAK": self.init_break or "",
|
||||
|
Reference in New Issue
Block a user