Re: State of the Art in Clojure Debugging

2015-03-30 Thread Paul deGrandis
Because of the blocking nature of vim-fireplace (really of vim itself), 
you'll have to run most of the debuggers from a live, dedicated repl.

I've been slowly evolving my own debug-repl for a few years now.  It works 
in a `user.clj` setting or in a project related file.  At a quick glance, 
it supports the major features found in clj-debugger (file info exists, but 
no file pretty-print).  You can see a recent gist of it here: 
https://gist.github.com/ohpauleez/4ca0b646b89512f38ea2

Some people may want to rename `debug-repl` to `break`, and `quit-dr` to 
`continue`.

 * Locals are in a map, easy to print or consume
 * The debug repl captures the metadata about the call-site, so you can 
easily print the file contents based on that information
 * There's a shorthand to bounce the debugger into the namespace where the 
call happened, `in-debug-ns`
 * There's tooling/functions to make any uncaught exception trigger the 
debugger/repl
 * There's a `try-repl` (try an expression and launch the debugger/repl on 
an exception)
 * There's an `assert-repl` (like `try-repl` but with an assert - useful 
when testing function contracts/invariants)
 * One can make the debug repl return a new form into the call-site (at 
`quit`/`continue`) or establish a default one.
 * This debug repl nests correctly

In a more recent version (not in the gist), I've toyed with capturing 
stackframes as objects, allowing you to go up/down in the "stack" within a 
limited scope.  I don't think this is a particularly good idea, but in 
certain contexts, it works nicely.

While I've never used it, you may want to look at vim-redl - 
https://github.com/dgrnbrg/vim-redl.  You could also use emacs with evil, 
and then use ritz for a true JVM debugger - https://github.com/pallet/ritz

Cheers,
Paul

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: State of the Art in Clojure Debugging

2015-03-30 Thread Lee Spector

Thanks for this Bozhidar.

I just took a look at clj-debugger  
and am excited about several of its features, especially the ability to print 
locals.

Does anyone know if it supports (or could easily support -- I'd post an issue 
if it seems possible) a way to say something like (print-locals-on-exception 
(some-fn)) where nothing in some-fn actually calls break or anything else in 
clj-debugger, and where, if an exception is raised in the execution of some-fn, 
then the locals at the point of the exception get printed?

 -Lee


> On Mar 30, 2015, at 10:27 AM, Bozhidar Batsov  wrote:
> 
> This is a newish REPL debugger that's editor agnostic - 
> https://github.com/razum2um/clj-debugger 
>  (and accidentally it's powering 
> CIDER's own debugger).
> 
> I'm pretty sure Cursive has the most sophisticated debugger right now, so the 
> question is whether you dislike Intellij IDEA as much as Emacs. :-)
> 

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: State of the Art in Clojure Debugging

2015-03-30 Thread Vijay Kiran

I've been using Spacemacs with great 
success https://github.com/syl20bnr/spacemacs and I heard some rave things 
from Vim aficionados. So you can get all the good stuff from bbastov's 
hardwork and still use Vim like environment :)

./Vijay


On Monday, March 30, 2015 at 4:27:32 PM UTC+2, Bozhidar Batsov wrote:
>
> This is a newish REPL debugger that's editor agnostic - 
> https://github.com/razum2um/clj-debugger (and accidentally it's powering 
> CIDER's own debugger).
>
> I'm pretty sure Cursive has the most sophisticated debugger right now, so 
> the question is whether you dislike Intellij IDEA as much as Emacs. :-)
>
>
>
> On 30 March 2015 at 15:20, Matthew West  > wrote:
>
>> What is the current preferred strategy for debugging Clojure code? I'd 
>> prefer a solution that doesn't involve Emacs, as I already know vim pretty 
>> well and don't really want to switch. What are my options that are still 
>> actively maintained?
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com 
>> 
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com 
>> 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 clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: State of the Art in Clojure Debugging

2015-03-30 Thread Bozhidar Batsov
This is a newish REPL debugger that's editor agnostic -
https://github.com/razum2um/clj-debugger (and accidentally it's powering
CIDER's own debugger).

I'm pretty sure Cursive has the most sophisticated debugger right now, so
the question is whether you dislike Intellij IDEA as much as Emacs. :-)



On 30 March 2015 at 15:20, Matthew West  wrote:

> What is the current preferred strategy for debugging Clojure code? I'd
> prefer a solution that doesn't involve Emacs, as I already know vim pretty
> well and don't really want to switch. What are my options that are still
> actively maintained?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> 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 clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


State of the Art in Clojure Debugging

2015-03-30 Thread Matthew West
What is the current preferred strategy for debugging Clojure code? I'd 
prefer a solution that doesn't involve Emacs, as I already know vim pretty 
well and don't really want to switch. What are my options that are still 
actively maintained?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.