11

When using edebug one can get a local variable by command describe-variable (C-h v), but are there any ways to display all local variables?

For example in Python you can call locals() in a pdb session, which returns all the local vars in dictionary. Does Elisp have a similar function?

3
  • 1
    You may be interested in function backtrace--locals, however, double hyphen suggests it's not intended for use by other packages. I.e. I would advise against using it in your ELisp programs, since the API may change, or the function will be removed entirely.
    – wvxvw
    Commented Sep 25, 2017 at 14:07
  • 1
    Plain debug has debugger-toggle-locals (bound to v), not sure about edebug.
    – npostavs
    Commented Sep 26, 2017 at 12:29
  • locals arent displayed as in let forms with C-h v. need to use "e" to evaluate.
    – RichieHH
    Commented Jan 24 at 9:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.