[PD-dev] print out everything that goes to sys_vgui()
Martin Peach
martin.peach at sympatico.ca
Wed Nov 7 05:29:38 CET 2007
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
More information about the Pd-dev
mailing list