@@ -29,7 +29,7 @@ import (
2929 "github.com/arduino/arduino-cli/commands"
3030 "github.com/arduino/arduino-cli/executils"
3131 "github.com/arduino/arduino-cli/i18n"
32- dbg "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/debug /v1"
32+ rpc "github.com/arduino/arduino-cli/rpc/cc/arduino/cli/commands /v1"
3333 "github.com/arduino/go-paths-helper"
3434 "github.com/sirupsen/logrus"
3535)
@@ -42,7 +42,7 @@ var tr = i18n.Tr
4242// grpc Out <- tool stdOut
4343// grpc Out <- tool stdErr
4444// It also implements tool process lifecycle management
45- func Debug (ctx context.Context , req * dbg. DebugConfigRequest , inStream io.Reader , out io.Writer , interrupt <- chan os.Signal ) (* dbg .DebugResponse , error ) {
45+ func Debug (ctx context.Context , req * rpc. GetDebugConfigRequest , inStream io.Reader , out io.Writer , interrupt <- chan os.Signal ) (* rpc .DebugResponse , error ) {
4646
4747 // Get debugging command line to run debugger
4848 pme , release := commands .GetPackageManagerExplorer (req )
@@ -75,7 +75,7 @@ func Debug(ctx context.Context, req *dbg.DebugConfigRequest, inStream io.Reader,
7575 // Get stdIn pipe from tool
7676 in , err := cmd .StdinPipe ()
7777 if err != nil {
78- return & dbg .DebugResponse {Error : err .Error ()}, nil
78+ return & rpc .DebugResponse {Error : err .Error ()}, nil
7979 }
8080 defer in .Close ()
8181
@@ -85,7 +85,7 @@ func Debug(ctx context.Context, req *dbg.DebugConfigRequest, inStream io.Reader,
8585
8686 // Start the debug command
8787 if err := cmd .Start (); err != nil {
88- return & dbg .DebugResponse {Error : err .Error ()}, nil
88+ return & rpc .DebugResponse {Error : err .Error ()}, nil
8989 }
9090
9191 if interrupt != nil {
@@ -111,13 +111,13 @@ func Debug(ctx context.Context, req *dbg.DebugConfigRequest, inStream io.Reader,
111111
112112 // Wait for process to finish
113113 if err := cmd .Wait (); err != nil {
114- return & dbg .DebugResponse {Error : err .Error ()}, nil
114+ return & rpc .DebugResponse {Error : err .Error ()}, nil
115115 }
116- return & dbg .DebugResponse {}, nil
116+ return & rpc .DebugResponse {}, nil
117117}
118118
119119// getCommandLine compose a debug command represented by a core recipe
120- func getCommandLine (req * dbg. DebugConfigRequest , pme * packagemanager.Explorer ) ([]string , error ) {
120+ func getCommandLine (req * rpc. GetDebugConfigRequest , pme * packagemanager.Explorer ) ([]string , error ) {
121121 debugInfo , err := getDebugProperties (req , pme )
122122 if err != nil {
123123 return nil , err
0 commit comments