-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Haskell GHCi Debug Adapter can't start #42
Comments
Hi. Q1
I am not sure, but seems that there are some cases of problem about "_utimensat" symbol, Q2
Q3
There seems to be a problem with finding/loading shared libraries, Regards. |
Firstly, "Step Out" is not supported with haskell-dap. Could you change log level to DEBUG in the launch.json file and run again ? Might works with "stack clean" & "stack test" from terminal, in the project dir. Regards. |
Hi, trying "stack clean" & "stack test" didn't make any difference for the debugger. Here's part of the output of the phoityne.log after having set the log level to DEBUG: `2019-03-29 19:48:18 [ThreadId 5] INFO phoityne - [EVENT]{"seq":3,"type":"event","event":"output","body":{"category":"stdout","output":"CMD: stack ghci --test --no-load --no-build --with-ghc=haskell-dap --main-is TARGET --ghci-options -fprint-evld-with-show \n\n","data":null}} 2019-03-29 19:48:20 [ThreadId 5] INFO phoityne - [EVENT]{"seq":4,"type":"event","event":"output","body":{"category":"stdout","output":"The following GHC options are incompatible with GHCi and have not been passed to it: -threaded\nConfiguring GHCi with the following packages: my-project\n[DAP][INFO] start haskell-dap-0.0.12.0.\nGHCi, version 8.6.4: http://www.haskell.org/ghc/ :? for help\nhaskell-dap: \nlookupSymbol failed in relocateSection (relocate external)\n/Users/utilisationnormale/.stack/programs/x86_64-osx/ghc-8.6.4/lib/ghc-8.6.4/unix-2.7.2.2/HSunix-2.7.2.2.o: unknown symbol 2019-03-29 19:48:20 [ThreadId 5] INFO phoityne - [EVENT]{"seq":5,"type":"event","event":"output","body":{"category":"stdout","output":":set prompt "H>>= "\n","data":null}} 2019-03-29 19:48:20 [ThreadId 5] INFO phoityne - [RESPONSE]{"seq":6,"type":"response","request_seq":2,"success":false,"command":"launch","message":"ghci launch error. <file descriptor: 32>: hPutChar: resource vanished (Broken pipe)"} 2019-03-29 19:48:20 [ThreadId 5] ERROR phoityne - ghci launch error. <file descriptor: 32>: hPutChar: resource vanished (Broken pipe)` I thinks that the problem is related to the fact that the Haskell unix-2.7.2.2 module isn't installed: Can you confirm this so that my next step would be to install that package via Cabal? Thanks, |
Hi, checking the haskell-dap package.yaml has shown a dependency to unix package. I tried to install that package by the following: First, I'd expect that my installation of haskell-dap should have installed the unix package since it depends on it. Am I right assuming that stack can do that? Lastly, how should I install the unix package? Although it is listed on stackage, there no documentation about how to install it. And the documentation on hackage is, to say the least, very minimal. Thanks, btw, I've closed this issue in my last reply accidentally. |
Yes, stack will install it. (means without installing haskell-dap, just stack setup.) How about trying to reinstall ghc? Regards. |
@hjoly2003 just in case, check your stack configuration: |
I try to run haskell-language-server in one of my stack project, Message: Installation error: unable to load package `unix-2.7.2.2' ghc-8.8.4 lookupSymbol failed in relocateSection (relocate external) |
I can't start the Haskell debugger.
After having installed the debug adapter and created a dummy project, I've set a break point and started the debugger (F5). A debugger floating toolbox briefly appeared, vanished, then..., nothing. And no debugger log file (phoityne.log) got created under the .vscode sub-directory.
CONTEXT:
DETAILS:
I have created a project with the following command
iMac:~ usr$ stack new my-project
iMac:~ usr$ cd my-project
iMac:my-project usr$ stack setup
iMac:my-project usr$ stack build
I have installed the dependencies of the Debug Adapter with the following command.
iMac:my-project usr$ stack build --copy-compiler-tool phoityne-vscode haskell-dap
The binaries got installed under
~/.stack/compiler-tools/x86_64-osx/ghc-8.6.4/bin
.I have included that directory in the PATH environment variable. I always launch vscode through the UNIX terminal under the
my-project
directory so that the IDE has access to this PATH environment variable.Here are the versions of the dependencies I have installed:
iMac:my-project usr$ phoityne-vscode --version
phoityne-vscode-0.0.28.0
iMac:my-project usr$ haskell-dap --version
haskell-dap-0.0.12.0
iMac:my-project usr$ hlint --version
HLint v2.1.11, (C) Neil Mitchell 2006-2018
Here is the content of the launch.json used for the Debug Adapter:
Please note that I'm using
--with-ghc=haskell-dap
for the ghciCmd variable. But if I try this command in a terminal window within my project directory...iMac:my-project usr$ stack ghci --test --no-load --no-build --with-ghc=haskell-dap --main-is TARGET --ghci-options -fprint-evld-with-show
I get the following:
The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
Configuring GHCi with the following packages: my-project
[DAP][INFO] start haskell-dap-0.0.12.0.
GHCi, version 8.6.4: http://www.haskell.org/ghc/ :? for help
haskell-dap:
lookupSymbol failed in relocateSection (relocate external)
/Users/utilisationnormale/.stack/programs/x86_64-osx/ghc-8.6.4/lib/ghc-8.6.4/unix-2.7.2.2/HSunix-2.7.2.2.o: unknown symbol '_utimensat'
haskell-dap: unable to load package 'unix-2.7.2.2'
But if, in the terminal window, I try the same command without the
--with-ghc=haskell-dap
then it works. I tried to remove that from the launch.json but the debugger does't start in vscode.As a final note, I've also tried the debugger after having replaced ${workspaceFolder} with the path of the project within the launch.json file. Alas, I got the same result.
Thanks in advance,
The text was updated successfully, but these errors were encountered: