Buildg allows visual and interactive debugging of Dockerfile on editors like VS Code, emacs and Neovim.
This is provided throgh DAP(Debug Adapter Protocol) supported by editors (official list).
- VS Code: https://github.com/ktock/vscode-buildg
- Emacs:
./emacs - Neovim:
./nvim
Refer to the VS Code documentation for UI usage: https://code.visualstudio.com/docs/editor/debugging
Execute command in the step.
Alias: e
Usage: exec [OPTIONS] [ARGS...]
If ARGS isn't provided, /bin/sh is used by default.
Flags:
--image: Execute command in the debuger image specified byimageproperty in the lauch configuration. If not specified, the command is executed on the rootfs of the current step.--mountroot value: Mountpoint to mount the rootfs of the step. ignored if--imageisn't specified. (default:/debugroot)--init-state: Execute commands in an initial state of that step (experimental)--tty,-t: Allocate tty (enabled by default)-i: Enable stdin. (FIXME: must be set with tty) (enabled by default)--env value,-e value: Set environment variables--workdir value,-w value: Working directory inside the container
Shows a list of commands or help for one command
Alias: h
Usage: help [COMMAND]
In the launch configuration (e.g. launch.json on VS Code), the following properties are provided.
programstring REQUIRED : Absolute path to Dockerfile.stopOnEntryboolean : Automatically stop after launch. (default:true)targetstring : Target build stage to build.imagestring : Image to use for debugging stage.build-argsarray : Build-time variables.ssharray : Allow forwarding SSH agent to the build. Format:default|<id>[=<socket>|<key>[,<key>]]secretsarray : Expose secret value to the build. Format:id=secretname,src=filepath
Common and mandatory properties are the following (see VS Code documentation for details).
type: Type of debugger to use. Must bedockerfile.request: The request type.launchis only supported in buildg as of now.name: The reader-friendly name of this configuration.
Following lists the current known limitations that should be eliminated in the futural version.
Step IntoandStep Outin Debug toolbar is unsupported in buildg. To inspect instructions deeper, you can useexecREPL command instead.- Logpoint, conditional, function and data breakpoints aren't supported.
- Setting value to a variable isn't supported.
attachrequest type in launch configuration isn't supported.
