Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "debug_adapter"

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

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
0.1.52034830e354f526d813dbc0fed944ebad795fba912https://github.com/eshelyaron/debug_adapter/releases/download/v0.1.5/debug_adapter-0.1.5.zip
0.1.820b252354b8b2cc006cb085042891e2b03c3d1813https://github.com/eshelyaron/debug_adapter/releases/download/v0.1.8/debug_adapter-0.1.8.zip
0.1.9dfa9ec8618cf17bf42019922c8e745d7a9d744bc11https://github.com/eshelyaron/debug_adapter/releases/download/v0.1.9/debug_adapter-0.1.9.zip
0.2.1414348c9c1a757a8defbc39d4548657583c142d81https://github.com/eshelyaron/debug_adapter/releases/download/v0.2.1/debug_adapter-0.2.1.zip
0.2.3772d31ba957f33be6650d2374dd29043367f88042https://github.com/eshelyaron/debug_adapter/releases/download/v0.2.3/debug_adapter-0.2.3.zip
0.2.4642eb88db4d8513badedf0aa492c2571474a56cb2https://github.com/eshelyaron/debug_adapter/releases/download/v0.2.4/debug_adapter-0.2.4.zip
0.2.5c5baa50bc7b156c5b6384f7b368e86cb833562e68https://github.com/eshelyaron/debug_adapter/releases/download/v0.2.5/debug_adapter-0.2.5.zip
0.2.62bf8548d735e82fe5662994937716696d400b6ab6https://github.com/eshelyaron/debug_adapter/releases/download/v0.2.6/debug_adapter-0.2.6.zip
0.2.8ee560607cd242055fbbc65b078cb580abf976a492https://github.com/eshelyaron/debug_adapter/releases/download/v0.2.8/debug_adapter-0.2.8.zip
0.2.9af177b0034f57857fd11f740cb7cfb6200fb86ce2https://github.com/eshelyaron/debug_adapter/releases/download/v0.2.9/debug_adapter-0.2.9.zip
0.2.10fd75e47629e318c80b2c9a5e35e80eba030cffb41https://github.com/eshelyaron/debug_adapter/releases/download/v0.2.10/debug_adapter-0.2.10.zip
0.2.11cde9f28a9dfa6319114062c0c2c5ff83c539721f2https://github.com/eshelyaron/debug_adapter/releases/download/v0.2.11/debug_adapter-0.2.11.zip
0.2.12d202d9726f772d89de88b8c76fa5f5b5782deba92https://github.com/eshelyaron/debug_adapter/releases/download/v0.2.12/debug_adapter-0.2.12.zip
0.2.13208ebd797d42ac9a38b88fda628b28a1ad48f6c13https://github.com/eshelyaron/debug_adapter/releases/download/v0.2.13/debug_adapter-0.2.13.zip
0.3.0758a588304ff90d772230df23ab943a53a0016f41https://github.com/eshelyaron/debug_adapter/releases/download/v0.3.0/debug_adapter-0.3.0.zip
0.3.1a93ba350a620cdb7d0c1c8dbb5dbcd0afe0eec433https://github.com/eshelyaron/debug_adapter/releases/download/v0.3.1/debug_adapter-0.3.1.zip
0.4.086ff29a7b8f5354f473e2d6d4ca914fb68c9d9733https://github.com/eshelyaron/debug_adapter/releases/download/v0.4.0/debug_adapter-0.4.0.zip
0.4.153fcee4f0c4d9024d517e809d6c44a74f554d9771https://github.com/eshelyaron/debug_adapter/releases/download/v0.4.1/debug_adapter-0.4.1.zip
0.4.306ad399236b1fa22847887ec256dd1792e071d741https://github.com/eshelyaron/debug_adapter/releases/download/v0.4.3/debug_adapter-0.4.3.zip
0.4.41d450741761f26cc1079649f30738a7b9635530a1https://github.com/eshelyaron/debug_adapter/releases/download/v0.4.4/debug_adapter-0.4.4.zip
0.4.5e6b190b584421a7fe2d0fa64d6de18872bd65df83https://github.com/eshelyaron/debug_adapter/releases/download/v0.4.5/debug_adapter-0.4.5.zip
0.4.640c4eed2ed66a0127f8587509cb35bbc8f4868f21https://github.com/eshelyaron/debug_adapter/releases/download/v0.4.6/debug_adapter-0.4.6.zip
0.5.08887227d6ce1ed667c0342b0c611aba6c491d73d2https://github.com/eshelyaron/debug_adapter/releases/download/v0.5.0/debug_adapter-0.5.0.zip
0.6.0af9cd3da9d2f6a487a7ea74edd41f2c24f3b49533https://github.com/eshelyaron/debug_adapter/releases/download/v0.6.0/debug_adapter-0.6.0.zip
0.6.2e47acedda5a0f1bd1a7fb9c3d28ecbad5c7175871https://github.com/eshelyaron/debug_adapter/releases/download/v0.6.2/debug_adapter-0.6.2.zip
0.6.3086d3d5c5aad233fccf52acf8098882e95fa68883https://github.com/eshelyaron/debug_adapter/releases/download/v0.6.3/debug_adapter-0.6.3.zip
0.7.0778968ae9e2ba10adab502c4e0bd74a6a5bcd3771https://github.com/eshelyaron/debug_adapter/releases/download/v0.7.0/debug_adapter-0.7.0.zip
0.7.1ad513615c7c5b5c03e3b3a8b3d47f9049b48debf1https://github.com/eshelyaron/debug_adapter/releases/download/v0.7.1/debug_adapter-0.7.1.zip
0.7.22feccbae80b4794cd967bed8722fa9d02d7b90319https://github.com/eshelyaron/debug_adapter/releases/download/v0.7.2/debug_adapter-0.7.2.zip

Debug Adapter Protocol for SWI-Prolog

Welcome to the SWI-Prolog Debug Adapter Protocol server, an implementation of DAP for SWI-Prolog, written in Prolog.

Installation

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.

Status

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.

DAP Events implementation coverage

event messages are notifications sent from the server to the client according to different runtime hooks that are implemented by the server.

EventDescriptionStatus
Breakpointthe status of a breakpoint has changed✅
Capabilitiesone or more capabilities have changed
Continuedthe execution of the debuggee has continued✅
Exitedthe debuggee has exited and returns its exit code✅
Initializedthe debug adapter is ready to accept configuration requests✅
Invalidatedsome state in the debug adapter has changed
LoadedSourcesource has been added, changed, or removed✅
Memorymemory range has been updated
Moduleinformation about a module has changed
Outputthe target has produced some output✅
Processthe debugger has begun debugging a new process
ProgressEndsignals the end of the progress reporting
ProgressStarta long running operation is about to start
ProgressUpdateprogress reporting needs to updated
Stoppedthe execution of the debuggee has stopped✅
Terminateddebugging of the debuggee has terminated
Threada thread has started or exited✅

DAP Requests implementation coverage

request messages are sent from the client to the server to retrieve information about the current runtime.

RequestDescriptionStatus
Attachattach to a debuggee that is already running✅
BreakpointLocationsobtain possible locations for source breakpoints in a given range
Completionsobtain possible completions for a given caret position and text✅
ConfigurationDonefinish initialization of the debug adapter✅
Continueresume execution of all threads✅
DataBreakpointInfoobtain information on a possible data breakpoint that could be set
Disassembledisassemble code at the provided location
Disconnectstop debugging✅
Evaluateevaluate the given expression in the context of the debuggee✅
ExceptionInfoobtain details about thrown exceptions✅
Gotoset the location where the debuggee will continue to run
GotoTargetsobtain possible goto targets for the specified source location
Initializeconfigure the debug adapter and obtain its capabilities✅
Launchstart the debuggee✅
LoadedSourcesobtain all sources currently loaded by the debuggee
Modulesobtain modules currently loaded by the debuggee
Nextexecute the specified thread for one step✅
Pausesuspend the debuggee✅
ReadMemoryread bytes from memory at the specified location
Restartrestart the debug session
RestartFramerestart execution of the specified stackframe✅
ReverseContinueresume backward execution of all threads
Scopesobtain the variable scopes for a given stackframe✅
SetBreakpointsset breakpoints in specified source locations✅
SetDataBreakpointsset data breakpoints
SetExceptionBreakpointsset the debug adapter's behaviour upon debuggee exceptions✅
SetExpressionassign runtime values to a given expression
SetFunctionBreakpointsset functions breakpoints✅
SetInstructionBreakpointsset intructions breakpoints
SetVariableassign runtime values to a given variable
Sourceobtain source code for a given source reference✅
StackTraceobtain stacktrace from the current execution state of a given thread✅
StepBackexecute the specified thread one backward step
StepInresume the specified thread to step into a function✅
StepInTargetsobtain possible stepIn targets for the specified stackframe✅
StepOutresume the specified thread to step out from a function✅
Terminateterminate the specified thread
TerminateThreadsterminate the specified threads
Threadsobtain the list of current threads✅
Variablesobtain all child variables for the specified variable reference✅
WriteMemorywrite bytes to memory at the specified location

DAP Reverse requests implementation coverage

Reverse requests are request messages sent from the server to the client to trigger client side operations.

Reverse RequestDescriptionStatus
RunInTerminalrun a command in a client controlled terminal✅

Roadmap

The two big milestones for this project are:

  • Reaching feature parity with SWI-Prolog's built-in graphical debugger with a DAP enabled IDE (GNU Emacs + dap-mode in particular), and
  • Supporting the entire DAP specification Some of the needed steps towards these goals are:
  • [x] Stepping through the source code of a debuggee with precise source positions
  • [x] Restarting debuged frames
  • [x] Supporting more debug requests - stepOut, stepBack, next
  • [x] Providing source code for dynamic predicates through decompilation
  • [x] Installing breakpoints at source positions
  • [x] Providing information about variable bindings in each frame
  • [x] Editing and reloading source code during break
  • [ ] ...

Contents of pack "debug_adapter"

Pack contains 15 files holding a total of 107K bytes.