- Notifications
You must be signed in to change notification settings - Fork1
haskell-debugger/haskell-estgi-debugger
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository contains thedap-estgi-server for Haskell debugging based on the Debug Adapter Protocol (DAP).
dap-estgi-server/: DAP server for External STG Interpreter (DAP-ESTGi)
This library depends on two other libraries as well
dap/: Language and backend independent DAP librarydap-estgi-vscode-extension/: VSCode extension to support Haskell debugging using DAP-ESTGi server
Thedap-estgi-vscode-extension turns VSCode into a Haskell debugger.VSCode offers a nice debugger UI while the debugger features are provided by the External STG Interpreter DAP Server.
flowchart LRsubgraph User InterfaceA(VSCode) -.- |Plugin API| B(DAP ESTGi Extension)endB <-->|DAP via network| C(DAP ESTGi Server)subgraph DebuggerC -.- |HS library API| D(External STG Interpreter)endThedap-estgi-server anddap-estgi-vscode-extension are application specific components, while thedap library is designed to be application independent to support any project that needs a simple DAP framework.
- Enable
Allow breakpoints everywhereoption in VSCode settings.
- Run
(cd haskell-estgi-debugger ; stack install zip-cmd) - Ensure
libgmpis installed (e.g. if using homebrew,brew install gmp)
- Run
(git clone https://github.com/haskell-debugger/dap-estgi-vscode-extension; cd dap-estgi-vscode-extension ; npm install) - Open
dap-estgi-vscode-extensionfolder by using theFiles/Open Foldermenu. - Open the
src/extension.tsfile. - Press F5 to run the extension in a new VSCode [Extension Development Host] window.
(cd dap-estgi-server ; stack run)
Note: If using Darwin OSX and you receive
external-stg-interpreter> * Missing (or bad) C library: ompexternal-stg-interpreter> This problem can usually be solved by installing the system package thatexternal-stg-interpreter> provides this library (you may need the "-dev" version). If the library isexternal-stg-interpreter> already installed but in a non-standard location then you can use the flagsexternal-stg-interpreter> --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If theexternal-stg-interpreter> library file does exist, it may contain errors that are caught by the Cexternal-stg-interpreter> compiler at the preprocessing stage. In this case you can re-run configureexternal-stg-interpreter> with the verbosity flag -v3 to see the error messages.Try installinglibomp frombrew and then running:
$ stack run --extra-include-dirs=/usr/local/opt/libomp/include --extra-lib-dirs=/usr/local/opt/libomp/lib
Add the following lines to debuggee's
stack.yaml:# use custom ext-stg whole program compiler GHCcompiler:ghc-9.2.7compiler-check:match-exactghc-variant:wpcsetup-info:ghc:linux64-custom-wpc-tinfo6:9.2.7:url:"https://github.com/grin-compiler/foundation-pak/releases/download/ghc-9.2.7/ghc-9.2.7-x86_64-unknown-linux.tar.xz"macosx-custom-wpc:9.2.7:url:"https://github.com/grin-compiler/foundation-pak/releases/download/ghc-9.2.7/ghc-9.2.7-x86_64-apple-darwin.tar.xz"macosx-aarch64-custom-wpc:9.2.7:url:"https://github.com/grin-compiler/foundation-pak/releases/download/ghc-9.2.7/ghc-9.2.7-aarch64-apple-darwin.tar.xz"
Run
stack buildi.e. build the provided sample hello world:(cd sample-program-to-debug ; stack build)
- Open debugge project folder by using the
Files/Open Foldermenu. - Select the debug view on the side bar
- Click to
create a launch.json file, then selectHaskell DAP ESTGi - Press F5 or the
Playbutton to start debugging
About
A modern Haskell debugger
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.




