Comments (6)
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.
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.
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.
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.
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.
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)
- xdebug 3 support HOT 1
- modern vdebug: does it play nicely with neovim and xdebug v3.0.2?
- nvim freezes on xdebug connection, then `Error starting Vdebug: <class 'EOFError'>` in the statusline
- Option to disable automatic updating of watch window
- No module found 'dbgp' but I am in a dbgp directory HOT 1
- VdebugEval! Can't get values of array at depth > 1 HOT 3
- Wrong reference in the VimPlug instalation at VimAwesome
- Python program stuck after debugging finish (cursor reach end of program)
- Infinite-ish recursion on singleton classes HOT 1
- No option with key 'autostart' HOT 1
- Vim hangs up connection without stopping on breaking point HOT 3
- Cannot expand or collapse HOT 1
- TypeError when empty xml elements in response HOT 1
- Are there plans for a new release?
- Update README PHP setup with Xdebug HOT 1
- Security concern
- Problems defining close keymap in neovim with lazy plugin manager
- Path maps not working HOT 1
- Error detected while processing /Users/***/vdebug.vim[343]..function Vdebug_load_options[8]..<SNR>11_DefineSigns HOT 1
- Setting up Vdebug without php.ini access
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vdebug.