Closed stevecheckoway closed 4 years ago
Hi.
Could you try this option ?
launch.json
cabal exec -- ghci-dap --interactive -i -i${workspaceFolder}
With stack, "-i" is applied twice, and it seems working.
That does indeed work!
Looking in the manual, the -i
without a path means to set the search path to be empty. With that change, the full path to Foo.hs
is reported when compiling it.
[1 of 2] Compiling Foo ( /Users/steve/programming/debug-example/Foo.hs, interpreted )
Description
I'm trying to debug a program built with cabal rather than stack (although I'm unsure if that's relevant) on macOS and I get an error "loaded module can not find from path" at program start when a break point is defined in a file other than
Main.hs
and a warning "unsupported request command" when trying to step into a function defined in a file other thanMain.hs
.The consequence of this bug is I cannot debug a multi-file project.
I have created a minimal example here. The
launch.json
is from the example config.Steps to reproduce warning
First, clone the repository and run VS Code.
Second, set a break point on line 6 of
Main.hs
.Third, press
F5
to start debugging.Fourth, press
F11
to step intofoo
.Results
The Debug Console outputs
(I'm not sure if the
origine
is supposed to be spelled that way or not.)VS Code opens a new editor tab
Foo.hs
, but it does not show the contents of the file. I have to stop the debugging at this point.Steps to reproduce error
First, set a break point on line 6 of
Foo.hs
.Second, press
F5
to start debugging.Results
The Debug Console shows
GHCi never broke at the break point.