-
-
Notifications
You must be signed in to change notification settings - Fork 653
[Fix #1106] Display local variables in the debugger #1121
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
Conversation
Malabarba
commented
Jun 11, 2015
It would be nice to display functions in a prettier way, but I guess that's more of a low-level cider thing, not really a role for the debugger. |
cider-debug.el
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think when the user sets this to t
in a defcustom
they expect the locals to always be shown and that any use of l
to toggle locals be scoped to the current debugging session.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly, but that was a lot more work (we just don't have a notion of debugging session yet =/), so I compromised a bit and left the toggle as persistent.
I could make it so that l
toggles locals only for this debugging step. That would be very simple, but I don't know if that's preferable to the current state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just renaming it to cider--debug-display-locals
and making it a defvar
instead of a defcustom
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure making this a defvar
would be a step in the right direction. A private defvar
is not something you see every day.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had in mind inspecting them.
Anyways, getting everything right the first time around is not super important. We just have to have a sane version of this feature to merge.
Generally, even the current state is acceptable to me as I don't share @expez's expectations about how the features would work - I'd expect it to work exactly as it does (although it'd be nice to have something affecting the scope of the session that doesn't exist).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[...] even the current state is acceptable to me
I really think we should get rid of the defcustom
, it doesn't represent anything a user should toggle in its current state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, you'll either have locals all the time or you won't. I'm fine with not having them by default and being able to globally toggle them, I'm also fine with being able to toggle them just for the current expression. Having this feature is an improvement, we can always refine it down the road (Lean for the win).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no strong opinions on the variable. As long as the user doesn't have to hit l
at every step this is fine by me. I'll remove it when I sit down for this again.
As for the notion of debugging session. I've thought of a way to implement this at the clojure side that wouldn't be too complicated, I just never had too much of a reason to (this is the first feature that misses it). But I'd rather keep things simple for 0.9, I already short on time as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let's just remove the variable and merge this.
Pushed. |
[Fix #1106] Display local variables in the debugger
👍 Looks good! |