I don't know about *the* preferred way, but it's my preferred way. It's a no-brainer to add print statements. I believe there is at least one logging library available too.
On Jan 21, 7:27 pm, ajay gopalakrishnan <[email protected]> wrote: > Is this the preferred way of debugging in Clojure? > > On Thu, Jan 21, 2010 at 5:25 PM, Richard Newman <[email protected]> wrote: > > I usually debug by adding println statements. How can I achieve the same > >> effect in Clojure. I don't think I can introduce println at arbitrary > >> places > >> to figure out at which step is the algorithm failing. > > > Sure you can. You might need to add a (do ) block if you're wanting to add > > them in an (if), but that's no different to any other form in an (if). > > > The only other consideration is laziness: your printlns might not fire when > > you think they should. > > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to [email protected] > > Note that posts from new members are moderated - please be patient with > > your first post. > > To unsubscribe from this group, send email to > > [email protected]<clojure%[email protected]> > > For more options, visit this group at > >http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
