monitor: support step-by-step breakpoint debugger
This commit adds a set of commands to monitor for enabling breakpoint debugger. This is implemented based on the walker utility for step-by-step LLB inspection. For each vertex and breakpoint, monitor calls Solve API so the user can enter to the debugger container on each vertex for inspection. User can enter to the breakpoint debugger mode by --invoke=debug-step flag. Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
This commit is contained in:
32
monitor/commands/clearall.go
Normal file
32
monitor/commands/clearall.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/docker/buildx/monitor/types"
|
||||
"github.com/docker/buildx/monitor/utils"
|
||||
)
|
||||
|
||||
type ClearallCmd struct {
|
||||
m types.Monitor
|
||||
}
|
||||
|
||||
func NewClearallCmd(m types.Monitor) types.Command {
|
||||
return &ClearallCmd{m}
|
||||
}
|
||||
|
||||
func (cm *ClearallCmd) Info() types.CommandInfo {
|
||||
return types.CommandInfo{
|
||||
Name: "clearall",
|
||||
HelpMessage: "clears all breakpoints",
|
||||
HelpMessageLong: `
|
||||
Usage:
|
||||
clearall
|
||||
`,
|
||||
}
|
||||
}
|
||||
|
||||
func (cm *ClearallCmd) Exec(ctx context.Context, args []string) error {
|
||||
utils.SetDefaultBreakpoints(cm.m.GetWalkerController().Breakpoints())
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user