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

adding variables to ghciEnv is not working #28

Open vkswhy opened 1 year ago

vkswhy commented 1 year ago

If I run the debugger without any env varibles its starts perfectly fine. But if add env variables to ghciEnv then it fails with error stack: runProcess: exec: does not exist (No such file or directory)

launch.json

{

"version": "0.2.0", "configurations": [ { "type": "ghc", "request": "launch", "name": "haskell-debug-adapter", "internalConsoleOptions": "neverOpen", "workspace": "${workspaceFolder}", "startup": "${workspaceFolder}/app/Newton/Main.hs", "startupFunc": "main", "startupArgs": "", "stopOnEntry": false, "mainArgs": "", "ghciPrompt": "H>>= ", "ghciInitialPrompt": "> ", "ghciCmd": "stack ghci ${workspaceFolder}/app/Newton/Main.sh --test --no-load", "ghciEnv": { "admin": "admin", "password": "password" }, "logFile": "${workspaceFolder}/.vscode/phoityne.log", "logLevel": "DEBUG", "forceInspect": false } ] }

configuration

ghc : 8.8.4 stack: 2.9.1 ghci-dap: 0.0.15.0 Haskell-debug-adapter: 0.0.35.0

Architecture: Mac OS M1 (arch x86_64)

phoityne commented 1 year ago

Hi.

I could not reproduce this issue in my environment. Could you show debug terminal logs.

Regards.

vkswhy commented 1 year ago

2022-11-28 15:24:01.652577000000 [58755(ThreadId 13)] DEBUG APP - ["stack","ghci","--test","--no-load","--no-build","--main-is","newton-hs-exe"] 2022-11-28 15:24:01.652873000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs get data. OutputEvent (OutputEvent {seqOutputEvent = 2, typeOutputEvent = "event", eventOutputEvent = "output", bodyOutputEvent = OutputEventBody {categoryOutputEventBody = "stdout", outputOutputEventBody = "Configuration read.\n", dataOutputEventBody = Nothing}}) 2022-11-28 15:24:01.655024000000 [58755(ThreadId 13)] INFO APP - "--with-ghc" option not found. adding "--with-ghc=ghci-dap" 2022-11-28 15:24:01.656585000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink get data. {"seq":2,"type":"event","event":"output","body":{"category":"stdout","output":"Configuration read.\n"}} 2022-11-28 15:24:01.657231000000 [58755(ThreadId 13)] DEBUG APP - ghci initial prompt [> ]. 2022-11-28 15:24:01.659049000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink start start. 2022-11-28 15:24:01.659790000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs start waiting. 2022-11-28 15:24:01.660216000000 [58755(ThreadId 14)] DEBUG RESPONSE - src start waiting. 2022-11-28 15:24:01.660600000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs get data. OutputEvent (OutputEvent {seqOutputEvent = 3, typeOutputEvent = "event", eventOutputEvent = "output", bodyOutputEvent = OutputEventBody {categoryOutputEventBody = "console", outputOutputEventBody = "Starting GHCi.\n", dataOutputEventBody = Nothing}}) 2022-11-28 15:24:01.666243000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink get data. {"seq":3,"type":"event","event":"output","body":{"category":"console","output":"Starting GHCi.\n"}} 2022-11-28 15:24:01.666253000000 [58755(ThreadId 13)] ERROR APP - stack: runProcess: exec: does not exist (No such file or directory) 2022-11-28 15:24:01.667258000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink start start. 2022-11-28 15:24:01.667861000000 [58755(ThreadId 13)] DEBUG APP - sink start waiting. 2022-11-28 15:24:01.668283000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs start waiting. 2022-11-28 15:24:01.668695000000 [58755(ThreadId 13)] DEBUG APP - src start waiting. 2022-11-28 15:24:01.669127000000 [58755(ThreadId 14)] DEBUG RESPONSE - src start waiting. 2022-11-28 15:24:01.673217000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs get data. OutputEvent (OutputEvent {seqOutputEvent = 4, typeOutputEvent = "event", eventOutputEvent = "output", bodyOutputEvent = OutputEventBody {categoryOutputEventBody = "stderr", outputOutputEventBody = "Wait for a moment.\n\n", dataOutputEventBody = Nothing}}) 2022-11-28 15:24:01.674745000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink get data. {"seq":4,"type":"event","event":"output","body":{"category":"stderr","output":"Wait for a moment.\n\n"}} 2022-11-28 15:24:01.675610000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink start start. 2022-11-28 15:24:01.675998000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs start waiting. 2022-11-28 15:24:01.676406000000 [58755(ThreadId 14)] DEBUG RESPONSE - src start waiting. 2022-11-28 15:24:01.676781000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs get data. OutputEvent (OutputEvent {seqOutputEvent = 5, typeOutputEvent = "event", eventOutputEvent = "output", bodyOutputEvent = OutputEventBody {categoryOutputEventBody = "stdout", outputOutputEventBody = "[DEBUG][APP] [\"stack\",\"ghci\",\"--test\",\"--no-load\",\"--no-build\",\"--main-is\",\"newton-hs-exe\"]\n", dataOutputEventBody = Nothing}}) 2022-11-28 15:24:01.679148000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink get data. {"seq":5,"type":"event","event":"output","body":{"category":"stdout","output":"[DEBUG][APP] [\"stack\",\"ghci\",\"--test\",\"--no-load\",\"--no-build\",\"--main-is\",\"newton-hs-exe\"]\n"}} 2022-11-28 15:24:01.680368000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink start start. 2022-11-28 15:24:01.680795000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs start waiting. 2022-11-28 15:24:01.681209000000 [58755(ThreadId 14)] DEBUG RESPONSE - src start waiting. 2022-11-28 15:24:01.681589000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs get data. OutputEvent (OutputEvent {seqOutputEvent = 6, typeOutputEvent = "event", eventOutputEvent = "output", bodyOutputEvent = OutputEventBody {categoryOutputEventBody = "stdout", outputOutputEventBody = "[INFO][APP] \"--with-ghc\" option not found. adding \"--with-ghc=ghci-dap\"\n", dataOutputEventBody = Nothing}}) 2022-11-28 15:24:01.684141000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink get data. {"seq":6,"type":"event","event":"output","body":{"category":"stdout","output":"[INFO][APP] \"--with-ghc\" option not found. adding \"--with-ghc=ghci-dap\"\n"}} 2022-11-28 15:24:01.685237000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink start start. 2022-11-28 15:24:01.685617000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs start waiting. 2022-11-28 15:24:01.686007000000 [58755(ThreadId 14)] DEBUG RESPONSE - src start waiting. 2022-11-28 15:24:01.686409000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs get data. OutputEvent (OutputEvent {seqOutputEvent = 7, typeOutputEvent = "event", eventOutputEvent = "output", bodyOutputEvent = OutputEventBody {categoryOutputEventBody = "console", outputOutputEventBody = "CWD: /Users/vikassinghpatel/Repositories/newton-hs\n", dataOutputEventBody = Nothing}}) 2022-11-28 15:24:01.688273000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink get data. {"seq":7,"type":"event","event":"output","body":{"category":"console","output":"CWD: /Users/vikassinghpatel/Repositories/newton-hs\n"}} 2022-11-28 15:24:01.689217000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink start start. 2022-11-28 15:24:01.689604000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs start waiting. 2022-11-28 15:24:01.690043000000 [58755(ThreadId 14)] DEBUG RESPONSE - src start waiting. 2022-11-28 15:24:01.690420000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs get data. OutputEvent (OutputEvent {seqOutputEvent = 8, typeOutputEvent = "event", eventOutputEvent = "output", bodyOutputEvent = OutputEventBody {categoryOutputEventBody = "console", outputOutputEventBody = "CMD: stack ghci --with-ghc=ghci-dap --test --no-load --no-build --main-is newton-hs-exe\n", dataOutputEventBody = Nothing}}) 2022-11-28 15:24:01.691953000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink get data. {"seq":8,"type":"event","event":"output","body":{"category":"console","output":"CMD: stack ghci --with-ghc=ghci-dap --test --no-load --no-build --main-is newton-hs-exe\n"}} 2022-11-28 15:24:01.693190000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink start start. 2022-11-28 15:24:01.693609000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs start waiting. 2022-11-28 15:24:01.693968000000 [58755(ThreadId 14)] DEBUG RESPONSE - src start waiting. 2022-11-28 15:24:01.694295000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs get data. OutputEvent (OutputEvent {seqOutputEvent = 9, typeOutputEvent = "event", eventOutputEvent = "output", bodyOutputEvent = OutputEventBody {categoryOutputEventBody = "console", outputOutputEventBody = "\n", dataOutputEventBody = Nothing}}) 2022-11-28 15:24:01.695533000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink get data. {"seq":9,"type":"event","event":"output","body":{"category":"console","output":"\n"}} 2022-11-28 15:24:01.696173000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink start start. 2022-11-28 15:24:01.696679000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs start waiting. 2022-11-28 15:24:01.697094000000 [58755(ThreadId 14)] DEBUG RESPONSE - src start waiting. 2022-11-28 15:24:01.697468000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs get data. LaunchResponse (LaunchResponse {seqLaunchResponse = 2, typeLaunchResponse = "response", request_seqLaunchResponse = 2, successLaunchResponse = False, commandLaunchResponse = "launch", messageLaunchResponse = "stack: runProcess: exec: does not exist (No such file or directory)"}) 2022-11-28 15:24:01.699200000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink get data. {"seq":2,"type":"response","request_seq":2,"success":false,"command":"launch","message":"stack: runProcess: exec: does not exist (No such file or directory)"} 2022-11-28 15:24:01.700159000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink start start. 2022-11-28 15:24:01.700489000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs start waiting. 2022-11-28 15:24:01.700820000000 [58755(ThreadId 14)] DEBUG RESPONSE - src start waiting. 2022-11-28 15:24:01.705443000000 [58755(ThreadId 12)] DEBUG REQUEST - lbs2req get data. {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":3} 2022-11-28 15:24:01.706383000000 [58755(ThreadId 12)] DEBUG REQUEST - sink start waiting. 2022-11-28 15:24:01.706816000000 [58755(ThreadId 12)] DEBUG REQUEST - lbs2req start waiting. 2022-11-28 15:24:01.707243000000 [58755(ThreadId 12)] DEBUG REQUEST - src start waiting. 2022-11-28 15:24:01.707558000000 [58755(ThreadId 13)] DEBUG APP - DisconnectRequest {seqDisconnectRequest = 3, typeDisconnectRequest = "request", commandDisconnectRequest = "disconnect", argumentsDisconnectRequest = Just (DisconnectArguments {restartDisconnectRequestArguments = Just False})} 2022-11-28 15:24:01.709201000000 [58755(ThreadId 13)] INFO APP - disconnect. 2022-11-28 15:24:01.709726000000 [58755(ThreadId 13)] DEBUG APP - sink start waiting. 2022-11-28 15:24:01.709884000000 [58755(ThreadId 14)] DEBUG RESPONSE - res2lbs get data. DisconnectResponse (DisconnectResponse {seqDisconnectResponse = 3, typeDisconnectResponse = "response", request_seqDisconnectResponse = 3, successDisconnectResponse = True, commandDisconnectResponse = "disconnect", messageDisconnectResponse = ""}) 2022-11-28 15:24:01.710155000000 [58755(ThreadId 13)] DEBUG APP - src start waiting. 2022-11-28 15:24:01.711675000000 [58755(ThreadId 14)] DEBUG RESPONSE - sink get data. {"seq":3,"type":"response","request_seq":3,"success":true,"command":"disconnect","message":""} 2022-11-28 15:24:01.713025000000 [58755(ThreadId 14)] INFO RESPONSE - disconnect. end of response thread. 2022-11-28 15:24:01.713545000000 [58755(ThreadId 14)] DEBUG RESPONSE - end response app 2022-11-28 15:24:01.714098000000 [58755(ThreadId 11)] INFO HDA - some threads stopped. exit. 2022-11-28 15:24:01.714535000000 [58755(ThreadId 11)] DEBUG HDA - finalize called.