Opened 7 years ago

Last modified 15 months ago

#1377 new task

GHCi debugger tasks

Reported by: simonmar Owned by: mnislaih
Priority: lowest Milestone: 7.6.2
Component: GHCi Version: 6.7
Keywords: Cc: phercek@…, mnislaih@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description (last modified by simonmar)

I'm collecting all these together into one ticket for now. Later we might split off individual tasks. Please update the description if you complete one of these.

easy

  • Autocompletion for :break only provides names, not modules

moderate

  • for each breakpoint we should retain the declpath constructed by the coverage pass. This would let us show the enclosing binding(s) for each breakpoint in the UI (eg. "Stopped in M.f (M.hs:40:23-28)").
  • :force should catch exceptions, so [1,2,undefined] would display as [1,2,< exception >]
  • show variables with unboxed types.
  • tabs go wrong with :list (but only for .lhs files, because unlit does tab expansion... duh)

unknown, or require thinking about

  • Some kind of "step over" or "next" command is needed.
  • :break <qualified name> only works if the name is exported can/should we relax this?
  • perhaps we should have a :watch command, that could be used to save variables for future inspection (they wouldn't get thrown away by :continue)
  • We can disable a breakpoint with ":set stop N :continue", but this still prints out the breakpoint info when we stop. Should we print the info only if there were no commands?
  • Revert to adding tick information to the BCO directly, and remove the byte code instructions for breaks. I'm not sure that this is worth it. In some ways the implementation based on a byte code instruction is a little cleaner than adding breaks on BCOs directly. Though the bc instruction method may be a little slower than the other way.
  • Flag to disable breakpoints?
  • When we restore the interactive context on resume, we throw away any new bindings made since the breakpoint. Can this be fixed?
  • threads and breakpoints.
  • if a :force results in a breakpoint, we should treat it as we do other evaluations. (currently we get "* Ignoring breakpoint").


  • It's a bit strange that in "f = e" you don't get a breakpoint covering the whole binding, but in "f x = e" you do.

Attachments (1)

noBreakInfo.patch (2.8 KB) - added by phercek 5 years ago.
patch: do not print anything to stdout when stopping at a breakpoint with custom code defined

Download all attachments as: .zip

Change History (20)

comment:1 Changed 7 years ago by simonmar

  • Description modified (diff)

comment:2 Changed 7 years ago by simonmar

  • Description modified (diff)

removing a couple of items that are done or have other tickets.

comment:3 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:4 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:5 Changed 5 years ago by phercek

  • Cc phercek@… added

Some ideas:

  • Some kind of step over or next...

Isn't :steplocal or :stepmodule it? Looks like already done.


  • We can disable a breakpoint with...

A breakpoint which has a code attached to it should not print anything not printed by the attached code. Well, except the command prompt printed if the attached code does not issue :continue. This would be handy. I asked for it also in my comment to #2737. If this is not done then custom implementation of features like conditional breakpoint or breakpoint setup solely to monitor value changes (an alternative to printf debugging) spit out a lot of garbage. The garbage can be suppressed but that suppresses also the legitimate program output. If you implement this then implementing flag for disabling breakpoints (a point later on) is not needed.

  • if a :force results in a breakpoint...

:force hitting a breakpoint should either print more information about the breakpoint or it should not print anything at all. The current situation is the worst one (it does something in the middle :) ). See also #2950. Anyway, I like the fact that :force does not stop at breakpoints. This ticket #2946 is related to :force too.

comment:6 Changed 5 years ago by mnislaih

  • Cc mnislaih@… added

comment:7 Changed 5 years ago by phercek

* Some kind of step over or next...
Now I see what was meant. It can be achieved with something like :cmd return "_result\n:step". Though I do not have any workaround for step out (would require dynamic stack?).

Changed 5 years ago by phercek

patch: do not print anything to stdout when stopping at a breakpoint with custom code defined

comment:8 Changed 5 years ago by mnislaih

Thanks for the patch Peter, I'll push it as soon as I run validate on it

comment:9 Changed 5 years ago by mnislaih

  • Owner set to igloo

Validated and pushed

Sun Feb 22 20:55:51 CET 2009  Peter Hercek <phercek@gmail.com>
  * Do not print anything to stdout when stopping at a breakpoint with custom code attached

Ian, this patch can be merged to 6.10, but do not close the ticket yet.

comment:10 Changed 5 years ago by igloo

  • Owner changed from igloo to mnislaih

Merged.

comment:11 Changed 5 years ago by igloo

  • Milestone changed from 6.10 branch to 6.12 branch

comment:12 Changed 4 years ago by igloo

  • Milestone changed from 6.12 branch to 6.12.3

comment:13 Changed 4 years ago by igloo

  • Milestone changed from 6.12.3 to 6.14.1
  • Priority changed from normal to low

comment:14 Changed 3 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:15 Changed 3 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:16 Changed 3 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:17 Changed 2 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from low to lowest

comment:18 Changed 19 months ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:19 Changed 15 months ago by morabbin

  • Type of failure set to None/Unknown

See also #1379.

Note: See TracTickets for help on using tickets.