phoityne / haskell-dap

Haskell implementation of DAP interface data.
https://hackage.haskell.org/package/haskell-dap
BSD 3-Clause "New" or "Revised" License
24 stars 3 forks source link

Launching with cabal new-repl doesn't work #10

Open sloane-shark opened 5 years ago

sloane-shark commented 5 years ago

I'm attempting to use haskell-dap (0.0.13.0), phoityne-vscode (0.0.28.0) along with the phoityne-vscode extension with GHC 8.6.5 to debug code. When I run cabal new-repl --with-ghc=haskell-dap, I get an error like

Warning: cannot determine version of
/nix/store/i9wdlh5hxk93r0c7hhhjw1axrhydk81j-ghc-8.6.5-with-packages/bin/ghci-dap
:
"[DAP][INFO] start ghci-dap-0.0.12.0.\n8.6.5\n"
cabal: The program 'ghc' version >=7.0.1 is required but the version of
/nix/store/i9wdlh5hxk93r0c7hhhjw1axrhydk81j-ghc-8.6.5-with-packages/bin/ghci-dap
could not be determined.

Is there any special set up needed to use this program with cabal new-* style commands? Is it compatible?

phoityne commented 5 years ago

Hi.

Thanks for your report. I will check cabal new-* style commands. (never tried so far.)

From your log, seems like that the current version might not work.

Regards.

phoityne commented 5 years ago

Could you try this command in the cabal project directory to start repl ?

$ cabal new-exec -- ghci-dap --interactive

And set ghciCmd variable in the launch.json file as below, when using with vscode.

"ghciCmd": "cabal new-exec -- ghci-dap --interactive -i${workspaceRoot}/src",

Regards.