@@ -53,6 +53,9 @@ func NewCommand(srv rpc.ArduinoCoreServiceServer) *cobra.Command {
53
53
Long : i18n .Tr ("Debug Arduino sketches. (this command opens an interactive gdb session)" ),
54
54
Example : " " + os .Args [0 ] + " debug -b arduino:samd:mkr1000 -P atmel_ice /home/user/Arduino/MySketch" ,
55
55
Args : cobra .MaximumNArgs (1 ),
56
+ PreRun : func (cmd * cobra.Command , args []string ) {
57
+ arguments .CheckFlagsConflicts (cmd , "input-dir" , "build-path" )
58
+ },
56
59
Run : func (cmd * cobra.Command , args []string ) {
57
60
runDebugCommand (cmd .Context (), srv , args , & portArgs , & fqbnArg , interpreter , importDir , & programmer , printInfo , & profileArg )
58
61
},
@@ -64,6 +67,7 @@ func NewCommand(srv rpc.ArduinoCoreServiceServer) *cobra.Command {
64
67
programmer .AddToCommand (debugCommand , srv )
65
68
profileArg .AddToCommand (debugCommand , srv )
66
69
debugCommand .Flags ().StringVar (& interpreter , "interpreter" , "console" , i18n .Tr ("Debug interpreter e.g.: %s" , "console, mi, mi1, mi2, mi3" ))
70
+ debugCommand .Flags ().StringVarP (& importDir , "build-path" , "" , "" , i18n .Tr ("Directory containing binaries for debug." ))
67
71
debugCommand .Flags ().StringVarP (& importDir , "input-dir" , "" , "" , i18n .Tr ("Directory containing binaries for debug." ))
68
72
debugCommand .Flags ().BoolVarP (& printInfo , "info" , "I" , false , i18n .Tr ("Show metadata about the debug session instead of starting the debugger." ))
69
73
0 commit comments