Skip to content

Instantly share code, notes, and snippets.

@Bardia95
Created May 6, 2022 07:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bardia95/98987c69c6970b1bb0698b863e2a84de to your computer and use it in GitHub Desktop.
Save Bardia95/98987c69c6970b1bb0698b863e2a84de to your computer and use it in GitHub Desktop.
Debugger Config Types & Docstrings for .replit file
// DebuggerConfig holds information necesary to run a language's debugger,
// potentially through a debug adapter that follows the
// https://microsoft.github.io/debug-adapter-protocol/
type DebuggerConfig struct {
// Support indicates whether this is supported by debugproxy.
Support bool `json:"support,omitempty" toml:"support"`
// If specified, then this overrides the main Compile config.
Compile *CompileConfig `json:"compile,omitempty" toml:"compile"`
// DAPConfig is the configuration needed for interactive debugging through
// an adapter that implements the DAP.
Interactive *DAPConfig `json:"interactive,omitempty" toml:"interactive"`
// TimeTravel is the configuration needed for time-travel debugging through
// an adapter that implements the DAP.
TimeTravel *struct {
// Record is the command needed to run and record an execution.
Record Command `json:"record" toml:"record"`
// Debug is the configuration of a DAP-compliant adapter that can be
// invoked to replay a pre-recorded execution.
Debug DAPConfig `json:"debug" toml:"debug"`
} `json:"timeTravel,omitempty" toml:"timeTravel"`
// Legacy options, prefer to use the `Interactive` field instead.
// DAPTransport indicates how the adapter exposes the DAP communication
// channel to the debugproxy. Valid values are "stdio" and something that Go
// accepts as an argument to `net.Dial()`.
DAPTransport string `json:"dapTransport,omitempty" toml:"dapTransport"`
// DAPConnectTimeout is the number of seconds that the debugproxy will wait
// for the port to be available before declaring the initialization failed.
// Defaults to 15s.
DAPConnectTimeout int64 `json:"dapConnectTimeout,omitempty" toml:"dapConnectTimeout"`
// DAPIntegratedAdapter indicates that the runtime environment that runs the
// debugee is the same one that runs the adapter. This means that the TTY
// should be attached to the runtime, and the DAP will be eposed through a
// separate channel.
DAPIntegratedAdapter *DAPIntegratedAdapterConfig `json:"dapIntegratedAdapter,omitempty" toml:"dapIntegratedAdapter"`
// DAPStartCommand is the shell command needed to start the debug adapter.
// Used as is.
DAPStartCommand *Command `json:"dapStartCommand,omitempty" toml:"dapStartCommand"`
// DAPInitializeMessage is the initialize message for the Debug Adapter
// Protocol. Sent as-is.
DAPInitializeMessage map[string]interface{} `json:"dapInitializeMessage,omitempty" toml:"dapInitializeMessage"`
// DAPLaunchMessage is the launch/attach message for the Debug Adapter
// Protocol. Sent as-is.
DAPLaunchMessage map[string]interface{} `json:"dapLaunchMessage,omitempty" toml:"dapLaunchMessage"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment