From: R. B. <ro...@pa...> - 2007-11-29 11:26:40
|
Recently an annotation mode was added in pydb and other similar debuggers - in particular the one for Ruby called ruby-debug. One of the pieces of information that is "annotated" is the local variables. In GNU Emacs, each piece of annotated information is put in its own buffer. It was felt by a ruby-debug user that it would be more helpful if in addition to showing local variables, instance variables (of @self) were also shown. In Ruby, instance variables start with @ while local variables don't; so they are visually distinct. Likewise class variables start with @@ and constants start with a capital letter. Currently the way this is handled is that an "info variables" debugger command was added; this shows a combination of locals/instance_variables. A "variables" buffer then shows this in a separate window/frame. (Note that in gdb and pydb there is buffer is called a "locals" buffer. In Ruby when the contents of that buffer changed from "locals" to "locals + instance variables" the name of that buffer changed to "variables".) At any rate I wonder if this observation might also applicable for Python as well. However in Python, class, constant and and instance variables are not distinct from local variables. So there are a couple parts to this question. First what should be annotated? And second, what should be shown in an Emacs buffer. For example, it is possible for example to annotate separately class, and local variables, but show these combined in a single buffer. Since each variable is not visually distinct there might be a separator line in the buffer or maybe some mechanism to make them visually distinct. Or there could be more windows/frames. Or there might be a setting to indicate what variables get shown in a "variable" windows. Thoughts? |