b main
run
next
locals
bt
continue
quitsource ~/.zshrc
set_moon_stable
moon info && moon fmt
moon check
moon test
moon build --target native -g repl
alias moondbg="$PWD/_build/native/debug/build/repl/repl.exe"MOONDBG_TOOLCHAIN_ACCEPTANCE=1 moon test acceptance/breakpoint_management_wbtest.mbt --no-parallelize
MOONDBG_TOOLCHAIN_ACCEPTANCE=1 moon test acceptance --no-parallelizecd testdata/dwarf_probe
moondbg breakpoint_managementb main
b identity
b breakpoint_management/main.mbt:18
run
breakpoints
disable 2
continueenable 2
delete 3
continue
p value
continue
p valuedelete 2
continue
breakpoints
run
delete 1
continue
breakpoints
quitpub(open) trait DebugBackend {
async fn launch(Self, executable : String, source_breakpoints : Array[SourceBreakpoint], function_breakpoints : Array[FunctionBreakpoint]) -> RunOutcome
async fn synchronize_breakpoints(Self, configuration : BreakpointConfiguration) -> BreakpointSyncResult
async fn abandon_execution(Self) -> Unit
async fn continue_execution(Self, thread : ThreadSelection) -> RunOutcome
async fn next(Self, thread : ThreadSelection) -> RunOutcome
async fn step(Self, thread : ThreadSelection) -> RunOutcome
async fn finish(Self, thread : ThreadSelection) -> RunOutcome
async fn stack_snapshot(Self, thread : ThreadSelection, window : StackWindow) -> StackSnapshot
async fn find_variable(Self, thread : ThreadSelection, frame : FrameSelection, path : VariablePath) -> VariableLookupResult
async fn local_variables(Self, thread : ThreadSelection, frame : FrameSelection) -> LocalVariablesSnapshot
fn breakpoint_snapshots(Self) -> Array[BreakpointSnapshot]
fn function_breakpoint_snapshots(Self) -> Array[FunctionBreakpointSnapshot]
fn take_output(Self) -> Array[DebugOutput]
async fn disconnect(Self) -> Unit
fn close(Self) -> Unit
}pub(all) suberror BreakpointSyncError {
BreakpointSyncRejected(String)
BreakpointSyncUncertain(String)
} derive(Debug)pub suberror DebugSessionError {
OperationNotAllowed(state~ : DebugSessionState, action~ : String)
FrameNotLoaded(Int)
FrameNotFound(Int)
NoFrameSelected
NoVisibleCaller(Int)
NoVisibleCallee(Int)
AdapterFailure(String)
BreakpointNotFound(Int)
BreakpointManagementRejected(String)
} derive(Debug)pub(all) suberror StackSnapshotError {
InvalidLogicalThreadIndex(Int)
InvalidPhysicalFrameIndex(Int)
InvalidStackWindow(start~ : Int, count~ : Int)
InvalidLoadedFrameRange(start~ : Int, count~ : Int)
LoadedFrameCountMismatch(expected~ : Int, actual~ : Int)
UnexpectedPhysicalFrameIndex(expected~ : Int, actual~ : Int)
CompleteStackStartsAfterZero(Int)
StackExtensionThreadMismatch(expected~ : Int, actual~ : Int)
StackExtensionMustStartAtZero(Int)
StackExtensionWentBackwards(previous~ : Int, next~ : Int)
StackExtensionChangedFrame(Int)
StackExtensionMadeNoProgress(Int)
} derive(Eq, Debug)pub(all) suberror VariableSnapshotError {
InvalidIndexedCollectionElementType(String)
InvalidIndexedCollectionLength(Int)
InvalidIndexedCollectionIndex(index~ : Int, total_length~ : Int)
UnorderedIndexedCollectionIndex(previous~ : Int, index~ : Int)
InvalidEnumConstructor(String)
InvalidEnumPayloadType(position~ : Int, type_name~ : String)
InvalidEnumPayloadPosition(expected~ : Int, actual~ : Int)
} derive(Eq, Debug)pub struct BreakpointConfiguration {
// private fields
}pub enum BreakpointInstallation {
NotInstalled
CurrentInstallation(BreakpointStatus)
PreviousInstallation(BreakpointStatus)
} derive(Eq, Debug)fn BreakpointInstallation::not_equal(x : BreakpointInstallation, y : BreakpointInstallation) -> Boolpub struct BreakpointListEntry {
id : Int
target : BreakpointTarget
enabled : Bool
installation : BreakpointInstallation
actual_line : Int?
location_count : Int?
locations : Array[BreakpointLocation]
} derive(Debug)pub struct BreakpointManagementResult {
operation : BreakpointOperation
breakpoint : BreakpointListEntry
changed : Bool
} derive(Debug)pub struct BreakpointSnapshot {
// private fields
}fn BreakpointSnapshot::pending(id : Int, source_path : String, requested_line : Int) -> BreakpointSnapshotfn BreakpointSnapshot::rejected(id : Int, source_path : String, requested_line : Int, message : String) -> BreakpointSnapshotfn BreakpointSnapshot::verified(id : Int, source_path : String, requested_line : Int, actual_line : Int?) -> BreakpointSnapshotfn BreakpointSnapshot::with_locations(self : BreakpointSnapshot, locations : Array[BreakpointLocation]) -> BreakpointSnapshotpub struct BreakpointSyncResult {
// private fields
}fn BreakpointSyncResult::functions(self : BreakpointSyncResult) -> Array[FunctionBreakpointSnapshot]fn BreakpointSyncResult::new(sources : Array[BreakpointSnapshot], functions : Array[FunctionBreakpointSnapshot]) -> BreakpointSyncResultpub enum BreakpointTarget {
SourceTarget(display_path~ : String, source_path~ : String, line~ : Int)
FunctionTarget(display_name~ : String, selector~ : FunctionBreakpointSelector)
} derive(Eq, Debug)pub struct DebugContext {
// private fields
}fn DebugContext::new(current_package : String, package_aliases : Array[(String, String)]) -> DebugContext raise DebugContextErrorfn DebugContext::package_for_alias(self : DebugContext, alias_name : StringView) -> String raise DebugContextErrorpub struct DebugOutput {
// private fields
}pub struct DebugSession {
// private fields
}async fn DebugSession::add_function_breakpoint(self : DebugSession, request : FunctionBreakpointRequest) -> FunctionBreakpointSnapshotasync fn DebugSession::add_source_breakpoint(self : DebugSession, source_path : String, line : Int, display_path? : String) -> BreakpointSnapshotasync fn DebugSession::complete_stack_snapshot(self : DebugSession) -> StackSnapshot raise DebugSessionErrorasync fn DebugSession::find_variable(self : DebugSession, path : VariablePath) -> VariableLookupResultasync fn DebugSession::manage_breakpoint(self : DebugSession, id : Int, operation : BreakpointOperation) -> BreakpointManagementResultfn DebugSession::new(executable : String, backend : &DebugBackend, debug_context? : DebugContext) -> DebugSessionasync fn DebugSession::select_frame(self : DebugSession, physical_index : Int) -> StackFrameSnapshot raise DebugSessionErrorfn DebugSession::select_visible_callee_frame(self : DebugSession) -> StackFrameSnapshot raise DebugSessionErrorasync fn DebugSession::select_visible_caller_frame(self : DebugSession) -> StackFrameSnapshot raise DebugSessionErrorpub enum FrameNavigationResult {
FrameAvailable(FrameSelection)
MoreFramesRequired(start_frame~ : Int)
VisibleFrameBoundary
} derive(Eq, Debug)pub struct FunctionBreakpoint {
// private fields
}fn FunctionBreakpointRequest::imported(package_alias : String, function_name : String) -> FunctionBreakpointRequestfn FunctionBreakpointRequest::not_equal(x : FunctionBreakpointRequest, y : FunctionBreakpointRequest) -> Boolfn FunctionBreakpointSelector::equal(FunctionBreakpointSelector, FunctionBreakpointSelector) -> Boolfn FunctionBreakpointSelector::not_equal(x : FunctionBreakpointSelector, y : FunctionBreakpointSelector) -> Boolpub struct FunctionBreakpointSnapshot {
// private fields
}fn FunctionBreakpointSnapshot::locations(self : FunctionBreakpointSnapshot) -> Array[BreakpointLocation]fn FunctionBreakpointSnapshot::pending(id : Int, display_name : String) -> FunctionBreakpointSnapshotfn FunctionBreakpointSnapshot::rejected(id : Int, display_name : String, message : String, location_count? : Int?) -> FunctionBreakpointSnapshotfn FunctionBreakpointSnapshot::verified(id : Int, display_name : String, location_count? : Int?) -> FunctionBreakpointSnapshotfn FunctionBreakpointSnapshot::with_locations(self : FunctionBreakpointSnapshot, locations : Array[BreakpointLocation]) -> FunctionBreakpointSnapshotfn IndexedCollectionSnapshot::new(kind : IndexedCollectionKind, element_type_name : String, total_length : Int, preview_elements : Array[IndexedVariableElement]) -> IndexedCollectionSnapshot raise VariableSnapshotErrorfn IndexedCollectionSnapshot::not_equal(x : IndexedCollectionSnapshot, y : IndexedCollectionSnapshot) -> Boolfn IndexedCollectionSnapshot::preview_elements(self : IndexedCollectionSnapshot) -> ReadOnlyArray[IndexedVariableElement]fn IndexedVariableElement::not_equal(x : IndexedVariableElement, y : IndexedVariableElement) -> Boolfn IndexedVariableElement::with_value(index : Int, value : VariableSnapshot) -> IndexedVariableElementpub(all) enum LocalCompactValue {
LocalScalar(String)
LocalCollection(IndexedCollectionKind, Int)
LocalStructure
LocalEnumConstructor(String)
LocalOpaque
} derive(Eq, Debug)fn LocalScopeAvailability::not_equal(x : LocalScopeAvailability, y : LocalScopeAvailability) -> Boolpub(all) enum LocalVariableAvailability {
LocalVariableAvailable(LocalCompactValue)
LocalVariableUnavailable
LocalVariableAmbiguous
} derive(Eq, Debug)fn LocalVariableAvailability::not_equal(x : LocalVariableAvailability, y : LocalVariableAvailability) -> Boolfn LocalVariableSnapshot::new(name : String, type_name : String?, availability : LocalVariableAvailability) -> LocalVariableSnapshotfn LocalVariablesSnapshot::available(thread : ThreadSelection, frame : FrameSelection, variables : Array[LocalVariableSnapshot]) -> LocalVariablesSnapshotfn LocalVariablesSnapshot::not_equal(x : LocalVariablesSnapshot, y : LocalVariablesSnapshot) -> Boolfn LocalVariablesSnapshot::scope_availability(self : LocalVariablesSnapshot) -> LocalScopeAvailabilityfn LocalVariablesSnapshot::scope_unavailable(thread : ThreadSelection, frame : FrameSelection) -> LocalVariablesSnapshotfn LocalVariablesSnapshot::variables(self : LocalVariablesSnapshot) -> ReadOnlyArray[LocalVariableSnapshot]pub struct SourceBreakpoint {
// private fields
}fn StackFrameSnapshot::new(physical_index : Int, raw_name : String, display_name : String, linkage_name : String?, source_path : String?, line : Int?, column : Int?, kind : FrameKind) -> StackFrameSnapshot raise StackSnapshotErrorfn StackSnapshot::new(thread : ThreadSelection, frames : Array[StackFrameSnapshot], loaded_start : Int, loaded_count : Int, total_frames_hint : Int?, complete : Bool) -> StackSnapshot raise StackSnapshotErrorfn StackSnapshot::validate_extension(self : StackSnapshot, next : StackSnapshot) -> Unit raise StackSnapshotErrorfn StackSnapshot::visible_callee(self : StackSnapshot, selection : FrameSelection) -> FrameNavigationResultfn StackSnapshot::visible_caller(self : StackSnapshot, selection : FrameSelection) -> FrameNavigationResultpub struct StopSnapshot {
// private fields
}fn StopSnapshot::new(reason : String, function_name : String, source_path : String?, line : Int?, column : Int?) -> StopSnapshotpub enum VariableContent {
VariableLeaf
VariableStructure(VariableStructureSnapshot)
VariableIndexedCollection(IndexedCollectionSnapshot)
VariableEnum(VariableEnumSnapshot)
} derive(Eq, Debug)fn VariableEnumPayload::scalar(position : Int, type_name : String, value : String) -> VariableEnumPayloadfn VariableEnumSnapshot::new(constructor_name : String, payload : Array[VariableEnumPayload]) -> VariableEnumSnapshot raise VariableSnapshotErrorpub enum VariableLookupFailure {
VariableRootNotFound(String)
VariableFieldNotFound(String, String)
VariableFieldAccessOnNonStruct(String, String, String?)
VariableIndexAccessOnNonCollection(String, Int, String?)
VariableIndexOutOfBounds(String, Int, Int)
VariableUnavailable(String)
} derive(Eq, Debug)pub enum VariableLookupResult {
VariableFound(VariableSnapshot)
VariableLookupFailed(VariableLookupFailure)
} derive(Eq, Debug)fn VariableLookupResult::field_access_on_non_struct(owner : String, field : String, type_name : String?) -> VariableLookupResultfn VariableLookupResult::index_access_on_non_collection(owner : String, index : Int, type_name : String?) -> VariableLookupResultfn VariableLookupResult::index_out_of_bounds(owner : String, index : Int, total_length : Int) -> VariableLookupResultfn VariableSnapshot::enum_value(name : String, type_name : String?, enum_value : VariableEnumSnapshot) -> VariableSnapshotfn VariableSnapshot::expanded(name : String, value : String, type_name : String?, children : Array[VariableSnapshot]) -> VariableSnapshotfn VariableSnapshot::indexed_collection(name : String, value : String, type_name : String?, collection : IndexedCollectionSnapshot) -> VariableSnapshotfn VariableSnapshot::truncated(name : String, value : String, type_name : String?, children : Array[VariableSnapshot]) -> VariableSnapshotfn VariableStructureSnapshot::children(self : VariableStructureSnapshot) -> ReadOnlyArray[VariableSnapshot]fn VariableStructureSnapshot::not_equal(x : VariableStructureSnapshot, y : VariableStructureSnapshot) -> Bool