Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/intrinsics.cr
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,15 @@ module Intrinsics
end
end

# Invokes an execution trap to catch the attention of a debugger. This has the
# same effect as placing a breakpoint in debuggers or IDEs supporting them.
#
# Execution is allowed to continue if the debugger instructs so. If no debugger
# is attached, usually the current process terminates with a status that
# corresponds to `Process::ExitReason::Breakpoint`.
#
# Inside an interpreter session, this drops into the REPL's pry mode instead of
# a system debugger.
macro debugger
::Intrinsics.debugtrap
end
Loading