phoityne / hdx4vsc

Haskell Debugger Extension for Visual Studio Code.

Home Page:https://marketplace.visualstudio.com/items?itemName=phoityne.phoityne-vscode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"[CRITICAL] can not get the initial ghci prompt" error when trying to run debugger

arielelkin opened this issue · comments

I have both cabal and stack installed on my system.

I followed the instructions to create a new Stack project.

$ ghci-dap --version             
[DAP][INFO] start ghci-dap-0.0.16.0.
The Glorious Glasgow Haskell Compilation System, version 8.10.4
$ haskell-debug-adapter --version                         
haskell-debug-adapter-0.0.35.0

When I click "start debugging" I get this error message:
image

These are the console logs:

Starting GHCi.
Wait for a moment.

CWD: /Users/arielelkin/stacker
CMD: stack ghci --with-ghc=ghci-dap --test --no-load --no-build --main-is TARGET

Now, waiting for an initial prompt("> ") from ghci.

The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
Configuring GHCi with the following packages: sample
[DAP][INFO] start ghci-dap-0.0.16.0.
GHCi, version 8.10.4: https://www.haskell.org/ghc/  :? for help

<interactive>:1:1: error:
    Bad interface file: /Users/me/.stack/programs/x86_64-osx/ghc-8.10.7/lib/ghc-8.10.7/ghc-prim-0.6.1/GHC/Types.hi
        mismatched interface file versions (wanted "8104", got "8107")
2

invalid HANDLE. eof.

This could be due to a mismatch between the two ghc I have installed:

$ stack exec ghc -- --version
The Glorious Glasgow Haskell Compilation System, version 8.10.7
$ ghc --version              
The Glorious Glasgow Haskell Compilation System, version 8.10.4

Isn't the debugger supposed to use stack ghc?

Hi.

Isn't the debugger supposed to use stack ghc?

No, the debugger uses the ghci-dap with the stack project environment.
Could you reinstall the ghci-dap, from your stack project folder (with ghc-8.10.7) ?

Regards.

Looks like it's working now, thanks