unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23468: Feature request: highlight Edebug breakpoints
@ 2016-05-06 17:10 Paul Pogonyshev
  2019-10-20 10:08 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Paul Pogonyshev @ 2016-05-06 17:10 UTC (permalink / raw)
  To: 23468

Problem: when you add a debug breakpoint it works, but gives you zero
indication where it is, until execution hits it.  This is inconvenient
and also a lack compared to pretty much any other visual debugger.

Breakpoints in Elisp buffers should be highlighted with overlays
(e.g. different background color) and, probably, with a sign on the
window fringe.  It would also help to highlight conditional breakpoints
differently than unconditional ones.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#23468: Feature request: highlight Edebug breakpoints
  2016-05-06 17:10 bug#23468: Feature request: highlight Edebug breakpoints Paul Pogonyshev
@ 2019-10-20 10:08 ` Lars Ingebrigtsen
  2019-10-20 11:08   ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-20 10:08 UTC (permalink / raw)
  To: Paul Pogonyshev; +Cc: 23468

Paul Pogonyshev <pogonyshev@gmail.com> writes:

> Problem: when you add a debug breakpoint it works, but gives you zero
> indication where it is, until execution hits it.  This is inconvenient
> and also a lack compared to pretty much any other visual debugger.
>
> Breakpoints in Elisp buffers should be highlighted with overlays
> (e.g. different background color) and, probably, with a sign on the
> window fringe.  It would also help to highlight conditional breakpoints
> differently than unconditional ones.

I've now added highlights for the breakpoints in Emacs 27.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#23468: Feature request: highlight Edebug breakpoints
  2019-10-20 10:08 ` Lars Ingebrigtsen
@ 2019-10-20 11:08   ` Eli Zaretskii
  2019-10-20 11:12     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2019-10-20 11:08 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 23468, pogonyshev

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Sun, 20 Oct 2019 12:08:05 +0200
> Cc: 23468@debbugs.gnu.org
> 
> I've now added highlights for the breakpoints in Emacs 27.

Thanks, but why isn't this in NEWS and in the ELisp manual?





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#23468: Feature request: highlight Edebug breakpoints
  2019-10-20 11:08   ` Eli Zaretskii
@ 2019-10-20 11:12     ` Lars Ingebrigtsen
  2019-10-20 11:47       ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-20 11:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 23468, pogonyshev

Eli Zaretskii <eliz@gnu.org> writes:

>> I've now added highlights for the breakpoints in Emacs 27.
>
> Thanks, but why isn't this in NEWS and in the ELisp manual?

I didn't think it was NEWS-worthy (or documentation-worthy): It just
a visual signifier that should have been there all along.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#23468: Feature request: highlight Edebug breakpoints
  2019-10-20 11:12     ` Lars Ingebrigtsen
@ 2019-10-20 11:47       ` Eli Zaretskii
  2019-10-20 12:08         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2019-10-20 11:47 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 23468, pogonyshev

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: pogonyshev@gmail.com,  23468@debbugs.gnu.org
> Date: Sun, 20 Oct 2019 13:12:43 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> I've now added highlights for the breakpoints in Emacs 27.
> >
> > Thanks, but why isn't this in NEWS and in the ELisp manual?
> 
> I didn't think it was NEWS-worthy (or documentation-worthy): It just
> a visual signifier that should have been there all along.

I think it should be documented because it presents a visual artifact
that users will need to understand.

And now that I see it in action, I think its visual appearance could
be improved.  What I see is the opening parenthesis of the form
highlighted in the 'highlight' face.  I think we should use a distinct
face, so that it doesn't "disappear" if the user has hl-line mode
enabled and so that users could customize it independently, and also I
think an indication similar to GUD (on the fringe etc.) would be
better: more prominent and much more self-explanatory.

Thanks.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#23468: Feature request: highlight Edebug breakpoints
  2019-10-20 11:47       ` Eli Zaretskii
@ 2019-10-20 12:08         ` Lars Ingebrigtsen
  2019-10-20 12:48           ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-20 12:08 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 23468, pogonyshev

Eli Zaretskii <eliz@gnu.org> writes:

> And now that I see it in action, I think its visual appearance could
> be improved.  What I see is the opening parenthesis of the form
> highlighted in the 'highlight' face.  I think we should use a distinct
> face, so that it doesn't "disappear" if the user has hl-line mode
> enabled and so that users could customize it independently, and also I
> think an indication similar to GUD (on the fringe etc.) would be
> better: more prominent and much more self-explanatory.

OK, I've now added a new face, but defaulted to the highlight face,
because that seems to stand out to me.

As for a fringe indication -- there may be a bunch of breakpoints.  Do
we want to have something in the fringe for all of them?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#23468: Feature request: highlight Edebug breakpoints
  2019-10-20 12:08         ` Lars Ingebrigtsen
@ 2019-10-20 12:48           ` Eli Zaretskii
  2019-10-20 17:18             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2019-10-20 12:48 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 23468, pogonyshev

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: pogonyshev@gmail.com,  23468@debbugs.gnu.org
> Date: Sun, 20 Oct 2019 14:08:46 +0200
> 
> OK, I've now added a new face, but defaulted to the highlight face,
> because that seems to stand out to me.

Thanks.

> As for a fringe indication -- there may be a bunch of breakpoints.  Do
> we want to have something in the fringe for all of them?

GUD puts a bitmap on the fringe for each breakpoint, yes.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#23468: Feature request: highlight Edebug breakpoints
  2019-10-20 12:48           ` Eli Zaretskii
@ 2019-10-20 17:18             ` Lars Ingebrigtsen
  2019-10-20 19:06               ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-20 17:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 23468, pogonyshev

Eli Zaretskii <eliz@gnu.org> writes:

>> As for a fringe indication -- there may be a bunch of breakpoints.  Do
>> we want to have something in the fringe for all of them?
>
> GUD puts a bitmap on the fringe for each breakpoint, yes.

Hm.  This is all pretty new to me...  but...
overlay-arrow-variable-list is a list of variables, each of which can
have one single position.

So to have more than a single fringe indication, we'd have to generate
one variable per breakpoint?

And you can't just put the positions into the list, either:

(setq overlay-arrow-variable-list
      (list (set-marker (make-marker) (point-min))
            (set-marker (make-marker) 100)))

Am I missing something, or does this mechanism just not support an
arbitrary number of fringe indicators?  (Well, without generating
variables dynamically, which I'm guessing we don't want to.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#23468: Feature request: highlight Edebug breakpoints
  2019-10-20 17:18             ` Lars Ingebrigtsen
@ 2019-10-20 19:06               ` Eli Zaretskii
  2019-10-21 20:29                 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2019-10-20 19:06 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 23468, pogonyshev

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: pogonyshev@gmail.com,  23468@debbugs.gnu.org
> Date: Sun, 20 Oct 2019 19:18:11 +0200
> 
> > GUD puts a bitmap on the fringe for each breakpoint, yes.
> 
> Hm.  This is all pretty new to me...  but...
> overlay-arrow-variable-list is a list of variables, each of which can
> have one single position.

No, that's not it.  Sorry, I've misled you: you need to look at
gdb-mi.el, where it puts on an overlay string a display property whose
value includes 'left-fringe.  See, e.g., gdb-put-string.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#23468: Feature request: highlight Edebug breakpoints
  2019-10-20 19:06               ` Eli Zaretskii
@ 2019-10-21 20:29                 ` Lars Ingebrigtsen
  2019-10-22  2:29                   ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-21 20:29 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 23468, pogonyshev

Eli Zaretskii <eliz@gnu.org> writes:

> No, that's not it.  Sorry, I've misled you: you need to look at
> gdb-mi.el, where it puts on an overlay string a display property whose
> value includes 'left-fringe.  See, e.g., gdb-put-string.

Ah, I see.  I've never used fringe stuff before and how it interacts
with overlays isn't self-evident.  Perhaps there should be an example in
the manual?

By cargo-culting the code from gdb-mi, I get the following way to make
an overlay that's not hiding anything in the buffer, but just showing a
fringe bitmap:

 (let ((fringe (make-overlay pos pos)))
   (overlay-put fringe 'before-string
                (propertize "x" 'display `(left-fringe breakpoint ,face)))))))))


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#23468: Feature request: highlight Edebug breakpoints
  2019-10-21 20:29                 ` Lars Ingebrigtsen
@ 2019-10-22  2:29                   ` Eli Zaretskii
  2019-10-22 14:21                     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2019-10-22  2:29 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 23468, pogonyshev

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: pogonyshev@gmail.com,  23468@debbugs.gnu.org
> Date: Mon, 21 Oct 2019 22:29:27 +0200
> 
> By cargo-culting the code from gdb-mi, I get the following way to make
> an overlay that's not hiding anything in the buffer, but just showing a
> fringe bitmap:
> 
>  (let ((fringe (make-overlay pos pos)))
>    (overlay-put fringe 'before-string
>                 (propertize "x" 'display `(left-fringe breakpoint ,face)))))))))

Yes, that's it.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* bug#23468: Feature request: highlight Edebug breakpoints
  2019-10-22  2:29                   ` Eli Zaretskii
@ 2019-10-22 14:21                     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 12+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-22 14:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 23468, pogonyshev

Eli Zaretskii <eliz@gnu.org> writes:

>> By cargo-culting the code from gdb-mi, I get the following way to make
>> an overlay that's not hiding anything in the buffer, but just showing a
>> fringe bitmap:
>> 
>>  (let ((fringe (make-overlay pos pos)))
>>    (overlay-put fringe 'before-string
>>                 (propertize "x" 'display `(left-fringe breakpoint ,face)))))))))
>
> Yes, that's it.

I've now added an example along these lines to the manual.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-10-22 14:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-06 17:10 bug#23468: Feature request: highlight Edebug breakpoints Paul Pogonyshev
2019-10-20 10:08 ` Lars Ingebrigtsen
2019-10-20 11:08   ` Eli Zaretskii
2019-10-20 11:12     ` Lars Ingebrigtsen
2019-10-20 11:47       ` Eli Zaretskii
2019-10-20 12:08         ` Lars Ingebrigtsen
2019-10-20 12:48           ` Eli Zaretskii
2019-10-20 17:18             ` Lars Ingebrigtsen
2019-10-20 19:06               ` Eli Zaretskii
2019-10-21 20:29                 ` Lars Ingebrigtsen
2019-10-22  2:29                   ` Eli Zaretskii
2019-10-22 14:21                     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).