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

Feedback on first usage #5

Closed
atmoz opened this issue Aug 24, 2012 · 6 comments
Closed

Feedback on first usage #5

atmoz opened this issue Aug 24, 2012 · 6 comments

Comments

@atmoz
Copy link

atmoz commented Aug 24, 2012

Hi, this looks awesome!

Just tested it a little, and wanted to give a short feedback on first impression.

When stopping at a breakpoint, I want to quickly see what's in a variable. With previous debugger client I could just hit F12 and pop, the variable content gets displayed. Is this possible? Now I have to browse the list of variables (sometimes that can be a lot, depending on file and local scope), seems counter-intuitive.

Also, when expanding the variable tree node with enter, it would be super nice to also close the node again with enter!

Keep up the good work, I really appreciate the effort into making a better debugger! :-)

@joonty
Copy link
Collaborator

joonty commented Aug 27, 2012

Hi, thanks for the feedback!

I like the idea of evaluating the variable at the current line. The challenge I can see is how to parse the variable from the line, as it depends on the language and the expression syntax. Also, do you evaluate the result of the expression or the first variable you come across in the line? For instance, something like this:

$myvar = 3;

is fine - $myvar should be evaluated. But what about:

do_something( $param1, $param2, $param3);

Do you give the evaulated result of the whole line, or the contents of $param1? If it involves parsing sections of the line before evaluating them, that leads to some complication as different languages will need different parsers.

I'm mostly thinking aloud here - if you have any suggestions then feel free to give them! I do really like this idea, and it will probably make its way in to the plugin in some form.

As for closing the tree nodes, I did actually originally want to get that in, but it turned out to be quite a lot of work for not much return (or so I thought). However, I'll take another look and see if I can get that in.

Thanks again for the suggestions!

@joonty
Copy link
Collaborator

joonty commented Aug 28, 2012

I've managed to get tree node closing working in the development branch. See commit 8a5fdea for the code, and pull the dev branch for the working code base.

@atmoz
Copy link
Author

atmoz commented Aug 28, 2012

That's awesome! Gonna test it tomorrow at work!

About the challenge in parsing the variable from current line: My (little) experience with the other clients is that they parse the variable under the cursor.

I'm not that sure about when to evaluate the result, my knowledge about the DBGP protocol is basically zero. I can again only reflect on my previous experience with other clients, where my impression is that the current line is not evaluated, but when I hit F12 on a variable I get the content if it's set before the current line. If that makes any sense.

@atmoz
Copy link
Author

atmoz commented Aug 29, 2012

It works great!

But I got the following error message when hitting enter on a (already open) root node:

E341: Internal error: lalloc(0, )
An error occured: <type 'exceptions.MemoryError'>
Traceback (most recent call last):
File "/home/atmoz/.dotfiles/.vim/bundle/vdebug/plugin/python/start_vdebug.py", line 70, in handle_return_keypress
return self.event_dispatcher.by_position()
File "/home/atmoz/.dotfiles/.vim/bundle/vdebug/plugin/python/vdebug/event.py", line 17, in by_position
return event.execute(self.runner)
File "/home/atmoz/.dotfiles/.vim/bundle/vdebug/plugin/python/vdebug/event.py", line 99, in execute
runner.ui.watchwin.delete(lineno,end_lineno+1)
File "/home/atmoz/.dotfiles/.vim/bundle/vdebug/plugin/python/vdebug/ui/vimui.py", line 249, in delete
self.buffer.append(remaining_buffer)
MemoryError

joonty added a commit that referenced this issue Aug 29, 2012
Closing a tree node that ends the watch window buffer no longer causes a
memory error.
@joonty
Copy link
Collaborator

joonty commented Aug 29, 2012

Thanks for that bug report, I've made a fix for it. It seems that it happened if the node that you wanted to close was the last thing in the watch window. Let me know if you still get it though!

Thanks also for the extra info about evaluating the variable under the cursor: it sounds do-able, so I'll start working on that. There's plenty of new stuff that's gone into this development branch, so after getting that in I'll merge it back into master and release a new version of vdebug on vim.org.

Thanks again for your suggestions!

@joonty
Copy link
Collaborator

joonty commented Aug 30, 2012

I've added support for evaluating the variable under the cursor, and have released a new version (1.1). Get it from the master branch or vim.org!

Cheers

@joonty joonty closed this as completed Aug 30, 2012
joonty added a commit that referenced this issue Apr 4, 2013
Closing a tree node that ends the watch window buffer no longer causes a
memory error.
joonty added a commit that referenced this issue Apr 6, 2013
Closing a tree node that ends the watch window buffer no longer causes a
memory error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants