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
.hc
------------------------------------------------------------------------ ----
Computer science is no more related to the computer than astronomy is related to the telescope. -Edsger Dykstra
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
Martin Peach wrote:
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
or use a proxy in between pd and pd-gui, either based on netcat or peer-data (https://svn.umlaeute.mur.at/svnroot/zmoelnig/projects/multipd)
fmgas.dr IOhannes