I would like to use NSTRACE to see its built-in messages, and create new ones, at various locations within nsterm.m. I imagine/guess that enabling NSTRACE needs to be done when configuring Emacs and it probably requires launching Emacs from the terminal and perhaps an interactive call such as M-x trace-...

Q:  How can I configure Emacs to enable NSTRACE and what other steps are needed to see the messages inside the terminal window?


For example, here is what I would use if I wanted to see the glyph debugging message inside xdisp.c:   I would use --enable-checking='glyphs' when configuring Emacs; then I would launch Emacs from the command line in a terminal; then I would type M-x trace-redisplay and I could see glyph debugging messages inside the terminal that are created inside xdisp.c like this:

#ifdef GLYPH_DEBUG
  debug_method_add (w, "This is my custom message.");
#endif
share|improve this question
up vote 3 down vote accepted

Look at src/nsterm.h (http://git.savannah.gnu.org/cgit/emacs.git/tree/src/nsterm.h?id=3f938e1#n41):

/* ==========================================================================

   Trace support

   ========================================================================== */

/* Uncomment the following line to enable trace.

   Uncomment suitable NSTRACE_GROUP_xxx lines to trace more.

   Hint: keep the trailing whitespace -- the version control system
   will reject accidental commits. */

/* #define NSTRACE_ENABLED 1          */

And IMO, questions about development are best asked on emacs-devel.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.