Did you know ... | Search Documentation: |
Packs (add-ons) for SWI-Prolog |
Title: | Debug Adapter Protocol package for SWI-Prolog |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 0.7.2 |
SHA1 sum: | 2feccbae80b4794cd967bed8722fa9d02d7b9031 |
Author: | Eshel Yaron <eshelshay.yaron@gmail.com> |
Maintainer: | Eshel Yaron <eshelshay.yaron@gmail.com> |
Packager: | Eshel Yaron <eshelshay.yaron@gmail.com> |
Home page: | https://github.com/eshelyaron/debug_adapter |
Download URL: | https://github.com/eshelyaron/debug_adapter/releases/download/v0.7.2/debug_adapter-0.7.2.zip |
No reviews. Create the first review!.
Welcome to the SWI-Prolog Debug Adapter Protocol server, an implementation of DAP for SWI-Prolog, written in Prolog.
debug_adapter
is available as a SWI-Prolog pack,
to use it simply run the following goal in the SWI-Prolog toplevel:
?- pack_install(debug_adapter).
If you're using GNU Emacs with dap-mode
, add the following lines to your init.el
:
(require 'dap-swi-prolog)
Now run `M-x dap-debug` in a Prolog buffer and have fun.
Most of the DAP specification is implemented and operational. For the status of specific features, see below.
For information about recent changes and additions, see NEWS.md.
Currently only tested with GNU Emacs and dap-mode
until we have a VS Code extension.
event
messages are notifications sent from the server to the client according to different
runtime hooks that are implemented by the
server.
Event | Description | Status |
---|---|---|
Breakpoint | the status of a breakpoint has changed | â |
Capabilities | one or more capabilities have changed | |
Continued | the execution of the debuggee has continued | â |
Exited | the debuggee has exited and returns its exit code | â |
Initialized | the debug adapter is ready to accept configuration requests | â |
Invalidated | some state in the debug adapter has changed | |
LoadedSource | source has been added, changed, or removed | â |
Memory | memory range has been updated | |
Module | information about a module has changed | |
Output | the target has produced some output | â |
Process | the debugger has begun debugging a new process | |
ProgressEnd | signals the end of the progress reporting | |
ProgressStart | a long running operation is about to start | |
ProgressUpdate | progress reporting needs to updated | |
Stopped | the execution of the debuggee has stopped | â |
Terminated | debugging of the debuggee has terminated | |
Thread | a thread has started or exited | â |
request
messages are sent from the client to the server to retrieve
information about the current runtime.
Request | Description | Status |
---|---|---|
Attach | attach to a debuggee that is already running | â |
BreakpointLocations | obtain possible locations for source breakpoints in a given range | |
Completions | obtain possible completions for a given caret position and text | â |
ConfigurationDone | finish initialization of the debug adapter | â |
Continue | resume execution of all threads | â |
DataBreakpointInfo | obtain information on a possible data breakpoint that could be set | |
Disassemble | disassemble code at the provided location | |
Disconnect | stop debugging | â |
Evaluate | evaluate the given expression in the context of the debuggee | â |
ExceptionInfo | obtain details about thrown exceptions | â |
Goto | set the location where the debuggee will continue to run | |
GotoTargets | obtain possible goto targets for the specified source location | |
Initialize | configure the debug adapter and obtain its capabilities | â |
Launch | start the debuggee | â |
LoadedSources | obtain all sources currently loaded by the debuggee | |
Modules | obtain modules currently loaded by the debuggee | |
Next | execute the specified thread for one step | â |
Pause | suspend the debuggee | â |
ReadMemory | read bytes from memory at the specified location | |
Restart | restart the debug session | |
RestartFrame | restart execution of the specified stackframe | â |
ReverseContinue | resume backward execution of all threads | |
Scopes | obtain the variable scopes for a given stackframe | â |
SetBreakpoints | set breakpoints in specified source locations | â |
SetDataBreakpoints | set data breakpoints | |
SetExceptionBreakpoints | set the debug adapter's behaviour upon debuggee exceptions | â |
SetExpression | assign runtime values to a given expression | |
SetFunctionBreakpoints | set functions breakpoints | â |
SetInstructionBreakpoints | set intructions breakpoints | |
SetVariable | assign runtime values to a given variable | |
Source | obtain source code for a given source reference | â |
StackTrace | obtain stacktrace from the current execution state of a given thread | â |
StepBack | execute the specified thread one backward step | |
StepIn | resume the specified thread to step into a function | â |
StepInTargets | obtain possible stepIn targets for the specified stackframe | â |
StepOut | resume the specified thread to step out from a function | â |
Terminate | terminate the specified thread | |
TerminateThreads | terminate the specified threads | |
Threads | obtain the list of current threads | â |
Variables | obtain all child variables for the specified variable reference | â |
WriteMemory | write bytes to memory at the specified location |
Reverse requests are request
messages sent from the server to the
client to trigger client side operations.
Reverse Request | Description | Status |
---|---|---|
RunInTerminal | run a command in a client controlled terminal | â |
The two big milestones for this project are:
dap-mode
in particular), andstepOut
, stepBack
, next
Pack contains 15 files holding a total of 107K bytes.