phoityne / hdx4vsc

Haskell Debugger Extension for Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=phoityne.phoityne-vscode
BSD 3-Clause "New" or "Revised" License
50 stars 9 forks source link

Remote debugging support #8

Open josefs opened 4 years ago

josefs commented 4 years ago

What's the status of remote debugging support? I've tried connecting VSCode to a remote repo but when I try to start Haskell debugging I get the following error:

/home/josefs/dap/test-repo/.vscode/phoityne.log: openFile: does not exist (No such file or directory)

I've tried creating that file by hand but it doesn't seem to help.

Is remote debugging supposed to work?

phoityne commented 4 years ago

Is remote debugging supposed to work?

With Remote SSH extension, yes. In my case, it works.

Regards.

josefs commented 4 years ago

Thanks. Good to know it works for you. Do you have any suggestions for how I can debug my issue?

phoityne commented 4 years ago

Could you let me know your local/remote OS, and put more vscode terminal/debug console logs?

This is a sample movie of remote debugging. 09_remote.gif

josefs commented 4 years ago

My local machine is a MacBook Pro and my remote is a machine running CentOS Linux.

I followed exactly what you did in the video you recorded but I still get the same error.

Btw, does the debugger only work on stack projects?

josefs commented 4 years ago

Here's the full error message that I get:

launch request error. LaunchRequest {seqLaunchRequest = 2, typeLaunchRequest = "request", commandLaunchRequest = "launch", argumentsLaunchRequest = LaunchRequestArguments {noDebugLaunchRequestArguments = Nothing, nameLaunchRequestArguments = "haskell-debug-adapter", typeLaunchRequestArguments = "ghc", requestLaunchRequestArguments = "launch", startupLaunchRequestArguments = "/home/josefs/dap/test-repo/test/Spec.hs", workspaceLaunchRequestArguments = "/home/josefs/dap/test-repo", logFileLaunchRequestArguments = "/home/josefs/dap/test-repo/.vscode/phoityne.log", logLevelLaunchRequestArguments = "WARNING", ghciPromptLaunchRequestArguments = "H>>= ", ghciCmdLaunchRequestArguments = "stack ghci --test --no-load --no-build --main-is TARGET --ghci-options -fprint-evld-with-show", stopOnEntryLaunchRequestArguments = False, mainArgsLaunchRequestArguments = Just "", ghciEnvLaunchRequestArguments = fromList [], ghciInitialPromptLaunchRequestArguments = Just "Prelude>", startupFuncLaunchRequestArguments = Just "", startupArgsLaunchRequestArguments = Just ""}} /home/josefs/dap/test-repo/.vscode/phoityne.log: openFile: does not exist (No such file or directory)

phoityne commented 4 years ago

Could you reinstall libraries on CentOS ? From your log, some tools might be old.

centos# stack install haskell-dap ghci-dap haskell-debug-adapter
centos# ghci-dap --version
centos#
centos# haskell-debug-adapter --version
centos#

Btw, does the debugger only work on stack projects?

No, it would work with "ghciCmd" which is defined in the launch.json, such as cabal.

Regards.