Giter VIP home page Giter VIP logo

Comments (6)

joonty avatar joonty commented on August 19, 2024

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!

from vdebug.

joonty avatar joonty commented on August 19, 2024

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.

from vdebug.

atmoz avatar atmoz commented on August 19, 2024

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.

from vdebug.

atmoz avatar atmoz commented on August 19, 2024

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

from vdebug.

joonty avatar joonty commented on August 19, 2024

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!

from vdebug.

joonty avatar joonty commented on August 19, 2024

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

from vdebug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.