From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/45459 Path: news.gmane.org!not-for-mail From: "Alan STONE" Newsgroups: gmane.comp.tex.context Subject: Re: debugging Date: Tue, 11 Nov 2008 14:03:35 +0100 Message-ID: <326847810811110503x70744b10k58bd0fc7b5fdc812@mail.gmail.com> References: <326847810811110245n78f15278qf8f3a8435b8ce688@mail.gmail.com> <491967C9.3000103@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0039900246==" X-Trace: ger.gmane.org 1226408783 25788 80.91.229.12 (11 Nov 2008 13:06:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Nov 2008 13:06:23 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Tue Nov 11 14:07:23 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1KzsxD-0000lE-NT for gctc-ntg-context-518@m.gmane.org; Tue, 11 Nov 2008 14:06:47 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0838D1FC3E; Tue, 11 Nov 2008 14:05:38 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 23776-05-5; Tue, 11 Nov 2008 14:04:20 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4C2651FBD0; Tue, 11 Nov 2008 14:04:20 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 375F61FBD0 for ; Tue, 11 Nov 2008 14:04:19 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 23762-01-18 for ; Tue, 11 Nov 2008 14:03:35 +0100 (CET) Original-Received: from ey-out-1920.google.com (ey-out-1920.google.com [74.125.78.146]) by ronja.ntg.nl (Postfix) with ESMTP id C34FB1FBBA for ; Tue, 11 Nov 2008 14:03:35 +0100 (CET) Original-Received: by ey-out-1920.google.com with SMTP id 21so1024544eyc.38 for ; Tue, 11 Nov 2008 05:03:35 -0800 (PST) Original-Received: by 10.187.248.10 with SMTP id a10mr2469257fas.61.1226408615569; Tue, 11 Nov 2008 05:03:35 -0800 (PST) Original-Received: by 10.187.207.9 with HTTP; Tue, 11 Nov 2008 05:03:35 -0800 (PST) In-Reply-To: <491967C9.3000103@elvenkind.com> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:45459 Archived-At: --===============0039900246== Content-Type: multipart/alternative; boundary="----=_Part_78079_19731764.1226408615566" ------=_Part_78079_19731764.1226408615566 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Nov 11, 2008 at 12:08 PM, Taco Hoekwater wrote: > > Alan STONE wrote: > > > > I tried \tracingmacros=1 but that's not what I'm looking for. > \tracingassigns=1 is as close as you can get. Considering the enormous amount of information these \tracing* commands blurp into the log file, I think I'll read Tolstoy's "War and Peace" instead. ;O) > Otherwise, you will end up with extremely dangerous constructs > like this trick that may very well interfere with what you are > trying to debug: > > \let\normaldef\def > \def\dumpDEF > {\immediate\write16 > {\expandafter\string\theDEF=\expandafter\meaning\theDEF}} > \unexpanded\normaldef\def#1% yes, this redefines \def! > {\normaldef\theDEF{#1}\afterassignment\dumpDEF\normaldef#1} Thanks a lot Taco. This is better already, though still too much information in the log file to be user friendly. Would it be possible to restricts the output to the \def'\s which begin with specific characters, for example "my" as in \def\my* ? Or... Do you know some tool (Windows/Linux) which enables to filter these from the log file into a text file, or delete the unwanted ones from the log file ? Best, Alan ------=_Part_78079_19731764.1226408615566 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
On Tue, Nov 11, 2008 at 12:08 PM, Taco Hoekwater <taco@elvenkind.com> wrote:

Alan STONE wrote:
>
> I tried \tracingmacros=1 but that's not what I'm looking for.
\tracingassigns=1 is as close as you can get.
 
Considering the enormous amount of information these \tracing* commands blurp into the log file, I think I'll read Tolstoy's "War and Peace" instead.  ;O)
 
Otherwise, you will end up with extremely dangerous constructs
like this trick that may very well interfere with what you are
trying to debug:

  \let\normaldef\def
  \def\dumpDEF
    {\immediate\write16
      {\expandafter\string\theDEF=\expandafter\meaning\theDEF}}
  \unexpanded\normaldef\def#1% yes, this redefines \def!
    {\normaldef\theDEF{#1}\afterassignment\dumpDEF\normaldef#1}
 
Thanks a lot Taco. This is better already, though still too much information in the log file to be user friendly.
 
Would it be possible to restricts the output to the \def'\s which begin with specific characters, for example "my" as in \def\my* ?
 
Or...
 
Do you know some tool (Windows/Linux) which enables to filter these from the
log file into a text file, or delete the unwanted ones from the log file ?
 
Best,
Alan
------=_Part_78079_19731764.1226408615566-- --===============0039900246== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0039900246==--