How to make the debug function of haskell-idea-plugin work properly

1.1k views Asked by At

I installed haskell-idea-plugin to make a Haskell IDE.

The plugin can do the following things as claimed on https://github.com/Atsky/haskell-idea-plugin.

  • Haskell syntax highlight
  • Cabal syntax highlight
  • Error checking with ghc-modi.
  • Simple completion based on ghc-modi
  • Show type of symbol (Ctrl + Shift + T, or ⌘ + Shift + T on mac)
  • Build of cabal projects
  • Installation of cabal packages

  • REPL

But when I tried to debug the following simple Haskell file

module Main where

main = do
    str <- getLine
    putStrLn $ str++str

it reported: Debug execution error: Internal error occured while executing debug process for untitled

And here is my Haskell-debugger configuration: enter image description here

I also tried other options but it didn't work.

And here is my environment:

  1. Ubuntu14.10
  2. oracle-jdk6.0
  3. IntelliJ IDEA 13.1.16
  4. haskell-idea-plugin
  5. ghc-mod
  6. remote-debugger
1

There are 1 answers

0
Nick Linker On BEST ANSWER

Although I am under windows, I got the similar error. The steps that worked for me to resolve the error:

  1. Try run ghc-modi.exe from the command line. It were times when it resulted in error ghc-modi.exe: C:\Users\Nick\AppData\Roaming\cabal\bin\ghc-mod: createProcess: does not exist (No such file or directory) This is fixed by recompiling and installing ghc-mod from the sources, I guess ghc-modi contains the hard path to ghc-mod, and the compiled files are not movable across different machines.
  2. It seems that the remote-debugger has the same hard dependency on the position in the filesystem. During one of my previous installations I copied it from different machine and got C:\Portable\ghc-7.10.1\lib\settings: openFile: does not exist (No such file or directory). The fix is, again, rebuild remote-debugger from the sources on the current machine.
  3. Of course all these executables should be accessible in PATH.
  4. After that I created hello project from scratch and the (remote) debugging worked just fine.