package debug
import "github.com/open-policy-agent/opa/debug"
Package debug EXPERIMENTAL: This package is under active development and is subject to change.
Deprecated: This package is intended for older projects transitioning from OPA v0.x and will remain for the lifetime of OPA v1.x, but its use is not recommended. For newer features and behaviours, such as defaulting to the Rego v1 syntax, use the corresponding components in the github.com/open-policy-agent/opa/v1 package instead. See https://www.openpolicyagent.org/docs/latest/v0-compatibility/ for more information.
Index ¶
- Constants
- type Breakpoint
- type BreakpointID
- type Debugger
- type DebuggerOption
- func SetEventHandler(handler EventHandler) DebuggerOption
- func SetLogger(logger logging.Logger) DebuggerOption
- type Event
- type EventHandler
- type EventType
- type FrameID
- type LaunchEvalProperties
- type LaunchOption
- type LaunchProperties
- type LaunchTestProperties
- type Scope
- type Session
- type StackFrame
- type StackTrace
- type Thread
- type ThreadID
- type VarRef
- type Variable
Constants ¶
const ( ExceptionEventType = v1.ExceptionEventType StdoutEventType = v1.StdoutEventType StoppedEventType = v1.StoppedEventType TerminatedEventType = v1.TerminatedEventType ThreadEventType = v1.ThreadEventType )
Types ¶
type Breakpoint ¶
type Breakpoint = v1.Breakpoint
type BreakpointID ¶
type BreakpointID = v1.BreakpointID
type Debugger ¶
Debugger is the interface for launching OPA debugger Session(s). This implementation is similar in structure to the Debug Adapter Protocol (DAP) to make such integrations easier, but is not intended to be a direct implementation. See: https://microsoft.github.io/debug-adapter-protocol/specification
EXPERIMENTAL: These interfaces are under active development and is subject to change.
func NewDebugger ¶
func NewDebugger(options ...DebuggerOption) Debugger
type DebuggerOption ¶
type DebuggerOption = v1.DebuggerOption
func SetEventHandler ¶
func SetEventHandler(handler EventHandler) DebuggerOption
func SetLogger ¶
func SetLogger(logger logging.Logger) DebuggerOption
type Event ¶
type EventHandler ¶
type EventHandler = v1.EventHandler
type EventType ¶
type FrameID ¶
type LaunchEvalProperties ¶
type LaunchEvalProperties = v1.LaunchEvalProperties
type LaunchOption ¶
type LaunchOption = v1.LaunchOption
func RegoOption ¶
func RegoOption(opt func(*rego.Rego)) LaunchOption
RegoOption adds a rego option to the internal Rego instance. Options may be overridden by the debugger, and it is recommended to use LaunchEvalProperties for commonly used options.
type LaunchProperties ¶
type LaunchProperties = v1.LaunchProperties
type LaunchTestProperties ¶
type LaunchTestProperties = v1.LaunchTestProperties
type Scope ¶
Scope represents the variable state of a StackFrame.
type Session ¶
type StackFrame ¶
type StackFrame = v1.StackFrame
type StackTrace ¶
type StackTrace = v1.StackTrace
StackTrace represents a StackFrame stack.
type Thread ¶
Thread represents a single thread of execution.
type ThreadID ¶
type VarRef ¶
type Variable ¶
Source Files ¶
breakpoint.go debugger.go doc.go event.go frame.go thread.go variable.go
- Version
- v1.4.2 (latest)
- Published
- May 2, 2025
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 4 hours ago –
Tools for package owners.