help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [External] : Tip: Debugging with function `message-box'


From: Jean Louis
Subject: Re: [External] : Tip: Debugging with function `message-box'
Date: Thu, 24 Jun 2021 22:31:25 +0300
User-agent: Mutt/2.0.7+183 (3d24855) (2021-05-28)

* Drew Adams <drew.adams@oracle.com> [2021-06-24 21:50]:
> > I find it often easier to debug values of some variables by using the
> > function `message-box' instead of just `message':
> > 
> > (message-box "%s" "Hello")
> > 
> > Unlike the function `message' this one blocks the execution for a
> > while, or until confirmed. This is useful in various debugging
> > processes.
> 
> Sure.  Some alternatives, just for info:
> 
> To just pause so you can see the message (which gets
> logged to `*Messages*' anyway), you can use `sit-for'
> or `sleep-for'.  E.g. `(message "...")(sleep-for 2)'.
> 
> To block until confirmed, you can use `(debug)'.
> (`c' to just confirm.)  And `(debug nil <whatever>)'
> prints the <whatever> at the top of the debugger
> (like a message).

Good tips.

When there is something wrong I am also using C-u C-M-x to instrument
the function then I can go step by step verifying what is happening.


-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]