*zpst*: A library for printing Clojure stacktraces, showing source and 
arguments for Clojure functions on the stack.

https://github.com/kkinnear/zpst

There are three increasingly detailed ways to use zpst -- all without any 
changes to your source:


   1. As a replacement for pst, it will print your stacktrace and include 
   source for all of the functions for which it can find the source (which is 
   pretty much what you can see with the doc function).
   
   It will attempt to highlight the expression which was executing when the 
   exception occurred.  It doesn't show the source for an entire function, 
   rather it shows the name, the parameter list, and 8 lines before and two 
   lines after the expression that was executing (by default).
   
   2. If you have a "deterministic" exception -- that is, an exception 
   which you can recreate at will, then after you get an exception you can run 
   (collect), recreate the exception a second time, and then run (analyze).  
   Now when you use zpst, it will show you both the source for the functions 
   in the stacktrace (as above), and also the actual arguments to those 
   functions paired up with the parameter names from the function definition.
   
   *This is why you would want to use zpst* -- seeing the actual arguments 
   to your functions, without having to instrument your source to do so, can 
   be pretty compelling.
   
   3. If you have done #2 above, you can also get access to the arguments 
   for any frame where the source was shown.  You can examine the arguments at 
   the repl, and you can change and reset the arguments for any frame.  Then 
   you can re-evaluate the functions on the stack from that frame and see if 
   the new arguments change the exception or the return value.

Note that printing the stack trace with source code included (#1, above) is 
very similar to what the pyro library does, though zpst will attempt to 
highlight the actual expression executing.

To the best of my knowledge, no other library will collect and display the 
actual arguments to functions on the stack with no modifications to your 
source code.  As well, I know of no library which will allow you to modify 
those arguments and retry the function calls from pretty much anywhere on 
the stack.

This is the first release for this library, so I expect that some issues 
will arise.  

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to