Hans-Christoph Steiner wrote:
> Anyone know a quick hack to print everything that is sent to sys_vgui  
> to stderr?  It would be very helpful when debugging GUI objects. :D
>
>   
In s_inter.c:

void sys_vgui(char *fmt, ...)
...
    if (sys_debuglevel & DEBUG_MESSUP)
        fprintf(stderr, "%s",  sys_guibuf + sys_guibufhead);
...
around line 676.

Also line 54:
#define DEBUG_MESSUP 1      /* messages up from pd to pd-gui */
#define DEBUG_MESSDOWN 2    /* messages down from pd-gui to pd */

so if you do
sys_debuglevel |= DEBUG_MESSUP;
somewhere, everything sys_vgui receives will also be printed to stderr.

Also in s_main.c line 772:
        else if (!strcmp(*argv, "-d") && argc > 1 &&
            sscanf(argv[1], "%d", &sys_debuglevel) >= 1)
so starting pd with -d 1 should do the same thing without the need for 
hacking.
(untested)
Martin


_______________________________________________
PD-dev mailing list
[email protected]
http://lists.puredata.info/listinfo/pd-dev

Reply via email to