Skip to content

Commit ab03161

Browse files
pillo79cmaglie
andauthored
fix: debugging requires a non empty debug.executable (#2439)
* fix: debugging requires a non empty debug.executable * Updated docs --------- Co-authored-by: Cristian Maglie <[email protected]>
1 parent 0381aa5 commit ab03161

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

Diff for: commands/debug/debug_info.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ func getDebugProperties(req *rpc.GetDebugConfigRequest, pme *packagemanager.Expl
140140
}
141141
}
142142

143-
if !debugProperties.ContainsKey("executable") {
143+
if !debugProperties.ContainsKey("executable") || debugProperties.Get("executable") == "" {
144144
return nil, &arduino.FailedDebugError{Message: tr("Debugging not supported for board %s", req.GetFqbn())}
145145
}
146146

Diff for: docs/UPGRADING.md

+2
Original file line numberDiff line numberDiff line change
@@ -2533,6 +2533,8 @@ debug.server.openocd.scripts_dir={runtime.tools.openocd-0.10.0-arduino7.path}/sh
25332533
debug.server.openocd.script={runtime.platform.path}/variants/{build.variant}/{build.openocdscript}
25342534
```
25352535
2536+
The `debug.executable` key must be present and non-empty for debugging to be supported.
2537+
25362538
The `debug.server.XXXX` subkeys are optional and also "free text", this means that the configuration may be extended as
25372539
needed by the specific server. For now only `openocd` is supported. Anyway, if this change works, any other kind of
25382540
server may be fairly easily added.

Diff for: docs/platform-specification.md

+3
Original file line numberDiff line numberDiff line change
@@ -1369,12 +1369,15 @@ to provide some debug configuration directives.
13691369
All the debug directives are grouped under the `debug.*` directives. Here is the complete list of the supported
13701370
directives:
13711371

1372+
- `debug.executable`: is the absolute path to the compiled binary of the sketch
13721373
- `debug.toolchain`: is a unique identifier of the required toolchain, currently we support `gcc` (and compatible) only
13731374
- `debug.toolchain.path`: is the absolute path to the toolchain directory
13741375
- `debug.toolchain.prefix`: is the prefix of the toolchain (for example `arm-none-eabi-`)
13751376
- `debug.server`: is a unique identifier of the required debug server, currently we support only `openocd`
13761377
- `debug.svd_file`: is the absolute path to the SVD descriptor.
13771378

1379+
If the `debug.executable` property is not present or is empty debugging will not be allowed.
1380+
13781381
OpenOCD server specific configurations:
13791382

13801383
- `debug.server.openocd.path`: is the absolute path to the OpenOCD directory

0 commit comments

Comments
 (0)