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

Support the disabling of locals clearing #21

Closed
levand opened this issue Oct 10, 2013 · 5 comments
Closed

Support the disabling of locals clearing #21

levand opened this issue Oct 10, 2013 · 5 comments
Milestone

Comments

@levand
Copy link

levand commented Oct 10, 2013

The Clojure compiler clears locals after they are no longer used. While necessary for some code, this diminishes the utility of the debugger.

As of Clojure 1.4, it is possible to disable locals clearing during compilation by setting the :disable-locals-clearing key in the *compiler-options* var. Having a separate "compile without locals clearing" action at both the form and the buffer level would be great.

@hlship
Copy link

hlship commented Oct 10, 2013

+1

@cursive-ide
Copy link
Owner

When you say at the form and the buffer level, I'm assuming you mean in the REPL? I was thinking about having a toggle button in the REPL toolwindow (similar to the soft wraps one) which would disable locals clearing when enabled. Once I finally switch REPL startup to be run configurations, there could also be a check there to start with locals clearing disabled. Does that sound like what you're after?

I'll probably also need to add config for locals clearing to AOT compilation, but that's less urgent I think.

@levand
Copy link
Author

levand commented Oct 29, 2013

Yeah, a toggle button in the REPL window would be perfect.

AOT compilation is not a concern for me (personally).

@cursive-ide
Copy link
Owner

The most difficult thing about this change is going to be choosing the icon :-)

@cursive-ide
Copy link
Owner

Ok, I'm sorry for the huge wait on this one, but this is finally fixed in the next drop. There's a toggle button on the REPL toolbar which allows you to turn locals clearing on and off. Debug REPLs are now started with it on by default, normal REPLs are not. This works over remote REPLs too, and the button will be correctly highlighted at startup. This alters the var root of *compiler-options* so it should take effect in all threads.

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

3 participants