Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New user Feedback on troncle #4

Open
ghost opened this issue Jan 12, 2014 · 2 comments
Open

New user Feedback on troncle #4

ghost opened this issue Jan 12, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 12, 2014

Troncle seems like a good idea, I find myself still stuck doing printf debugging
with emacs for lack of better tooling.

A few suggestions:

  • In the README, "installation" should come before "Usage" in the README too IMO, just like in real life.
  • troncle-set-exec-var should try and guess the var i'm interested in from
    the region I selected. a little goes a long way to improve usability. (Update: does it actually do this already?)
  • I haven't done much emacs dev but sprinkled about is the notion that
    you should suggest default key-bindings but not set them. Emacs keymaps
    are a war zone.
  • The line/col information is not very useful, I need context information
    that's related to my source file, not to the code fragment cider submits
    to nrepl behind the scenes. That's probably a cider limitation though,
    and it's troublesome there too (stack traces). @bbatsov ?

a tracing buffer which does something like emacs's support for jumping
from compilation errors to the offending line or a variation there-of might
be nice, that probably requires some work though.

Thanks for releasing.

@coventry
Copy link
Owner

I'm very grateful for the feedback, @y-p. The line/column info should indicate the source code start position of the form who's evaluation is being reported on. If you have an example where you're not seeing that, can you please post it?

I'm coming from a python background, too, and I really miss the debugging facilities there. If you're interested in experimenting, there's a debugger in development on the branch https://github.com/coventry/troncle/tree/first-attempt-at-debugger. Use the elisp function troncle-debug-region to instrument a region with debugging tracing, and see debug.clj for the debugging commands.

I suspect that the future of clojure debugging is something like an integration of Schmetterling and Light Table, now that it's open-sourced. I am thinking of repurposing troncle's core macroshka library to use the javascript in Python Tutor to display the evolution of small clojure data structures. So I'm not sure how much further I'm going to push it as an emacs development tool.

@ghost
Copy link
Author

ghost commented Jan 12, 2014

What you describe re line information is what I see, but out what the 12th row from the start of the defn
isn't great useability. I use linenum-mode so the file line number is what would make sense. I realize
this may not be possible due to the way code is shipped to nrepl for execution.

I tried the ritz debugger and jswat today, the first plotzes if you don't use an old nrepl.el (which
can't coexist with cider) and doesn't support breakpoints on nrepl. the stack frame locals and restarts
are sweet though. I was unable to get JSwat to break execution.

schmetterling is new to me, it hasn't turned up in any search results - thanks for the tip.

I've played with earlier Lighttable but wasn't blown away, It's probably time to give it another look.
litable is a cute experiment.

Even in python I hardly use debuggers to step through code, but I do miss pdb.set_trace() and
ipythons' %debug and %pdb magics that just drop you into a repl from code or or at the site of the exception.
Half the time in clojure the stack trace is so horrible It's an effort to even identify the offending line.
debug-repl works like set_trace, but doesn't work well with the
repl buffer in emacs, so you have to jump back and forth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant