[PD] Trace in pd?

Krzysztof Czaja czaja at chopin.edu.pl
Mon Oct 22 17:38:53 CEST 2001


hi,

there is no tracing option in Pd, and I cannot see how to emulate
step-tracing, setting breakpoints etc. (not to mention blinking of
patchcords).  But simple tracing of messages passed around is
possible, if you would torture Pd sources a little and recompile
(make it a special debug-pd, do not replace the original executable
of course).  An example, which applies to anythings only, is in
m_class.c.diff attachment.  You can do similar things to pd_list()
(et al.) in m_pd.c.  You can filter out more classes or preserve
printing of those I have filtered out.

Btw. am I right, that `classmaker' was meant to be called
`canvasmaker'?

Krzysztof

delire wrote:
> 
> is there a trace function in pd - as in max?
> for instance: to get a step by step update of how my note numbers and
> velocities were being handled by a list object...
...
-------------- next part --------------
--- m_class.c~	Mon Oct 22 17:09:09 2001
+++ m_class.c	Mon Oct 22 17:08:41 2001
@@ -616,6 +616,17 @@
     int narg = 0;
     t_pd *bonzo;
     
+    if (c && c->c_name &&
+	c->c_name != gensym("messresponder") &&
+	c->c_name != gensym("classmaker") &&
+	c->c_name != gensym("objectmaker") &&
+	c->c_name != gensym("canvas") &&
+	c->c_name != gensym("guiconnect"))
+    {
+	startpost("%s <- %s", c->c_name->s_name, s ? s->s_name : "nul");
+	postatom(argc, argv);
+	endpost();
+    }
     	/* check for messages that are handled by fixed slots in the class
     	structure.  We don't catch "pointer" though so that sending "pointer"
 	to pd_objectmaker doesn't require that we supply a pointer value. */


More information about the Pd-list mailing list