#146 Debug / run with GHCi on word or expression

Idea (20)

Now you use debug or run with GHCi on a module (in contrast to run as application as you do on a cabal executable).

However, when you do that, you need to open up the command window and type in the start point of your debugging / run session.

Instead, you should be able to right click a word (like main) in your file and choose "debug this" or "run this in GHCi". It would be nice if it also worked on a selection for more complex expressions. In this way, we would rarely need to open up the command window and have it steal all that precious screen estate and hide our beautifully coloured code :)


  • JP Moresmau

    JP Moresmau - 2012-04-09
    • assigned_to: nobody --> jpmoresmau
  • JP Moresmau

    JP Moresmau - 2012-04-09

    But you'd still need to lose the screen estate to see the result right? Where do you envision seeing that?
    I was actually thinking about something along these lines. In the same way you can add and evaluate expressions while debugging, you could add expressions that would be recalculated when a file is saved (going through a GHCi session for example), so you would see in near-real time the effects of your code changes on the results...

  • Tobias Bexelius

    Tobias Bexelius - 2012-04-09

    Maybe in the Variables window? In most cases, Im not interested in the final result, but more in my breakpoints, and in that case I am using the Variables window and Expressions window to view the intermediate values.

    For expressions, maybe just a "Add to expression window" context menu option?

  • JP Moresmau

    JP Moresmau - 2012-10-25
    • status: open --> closed-accepted
  • JP Moresmau

    JP Moresmau - 2012-10-25

    Watch and Inspect actions have been added in the Haskell editor.
    Watch adds the selected text to the Expression window.
    Inspect is only visible if you're stopped at a breakpoint, it just pops up a window with the evaluation of the selected text. So you can view the result via Inspect, and use Watch if you want to keep the expression evaluating over several invocations.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks