You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I refresh the page or run the ajax call or whatever's runs php with xdebug, then nothing happens (php doesn't run, vdebug interface doesn't pop up)
I want vdebug to run at this point.
Workaround: I press an arrow key then vdebug starts up.
Request: I'd like vdebug to run automatically when php/xdebug connects, and not wait for me to touch the keyboard. Maybe this was not possible when vdebug was originally written, but surely it is possible with vim 8.
I noticed the same issue while working with a PHP code base. You must refocus on vim before the debugger will allow the PHP script to continue execution. In my case, I was having to press F5 which somehow "woke up" the plugin and then continued the execution of the script.
Thus far I've located the logic which should check to see if there is an active connection ready for debugging. However, I need to research the CursorHold vim event to see how long vim waits before triggering the event.
As an immediate next step I think we should create a simple PHP script and plugin config which reliably reproduces this issue.
Looks like it's checking for a debuggable process on keypress/focus/etc.
Instead, in versions that support it (8+ I think) I'd like vdebug instead to call job_start(... {'out_cb': ...}) or some such so it can be notified immediately when a debugger is requested.
Do you run vim in the terminal? It's a little easier there, because it doesn't have the FocusGained event.
Also, inconsistency is probably caused by the CursorHold/CursorHoldI callbacks, which trigger after an inactivity delay, mine is after 4 seconds of no keyboard activity. See :help CursorHold
As a temporary workaround you could :set updatetime=500 in your ``.vimrc`. This also makes vim write its swap file much sooner.
@JasonWoof Yes I always run vim in the terminal and I very occasionaly have this issue. I will look into it if I can find something. I shortly looked at the channel stuff but have to figure out if this is possible directly in python.
I've been experiencing this issue everytime I use vdebug (currently on deepin-terminal, but I'll test some others later) 🤔 @BlackIkeEagle Please, what terminal are you using?
@ltgouvea I'm mostly using termite, but also konsole (kde) and gnome-terminal, there is a need for a solution to trigger the debugging interface once a connection is there, but I did not take the proper time to look into it
I think this bug is less evident/reproducible on graphical instances of Vim because vdebug checks if it should start the debugger interface when the FocusGained event fires. Terminals don't notify vim about focus, hence needing to press a key in non-graphical vim instances.
Activity
proff321 commentedon Jul 30, 2019
I noticed the same issue while working with a PHP code base. You must refocus on vim before the debugger will allow the PHP script to continue execution. In my case, I was having to press
F5which somehow "woke up" the plugin and then continued the execution of the script.Thus far I've located the logic which should check to see if there is an active connection ready for debugging. However, I need to research the
CursorHoldvim event to see how long vim waits before triggering the event.As an immediate next step I think we should create a simple PHP script and plugin config which reliably reproduces this issue.
JasonWoof commentedon Jul 30, 2019
:) that looks like the problem all right :)
Looks like it's checking for a debuggable process on keypress/focus/etc.
Instead, in versions that support it (8+ I think) I'd like vdebug instead to call job_start(... {'out_cb': ...}) or some such so it can be notified immediately when a debugger is requested.
BlackIkeEagle commentedon Aug 5, 2019
I can't reproduce this issue consistently, I only have this occasionally which made me not really look into it.
JasonWoof commentedon Aug 5, 2019
Do you run vim in the terminal? It's a little easier there, because it doesn't have the
FocusGainedevent.Also, inconsistency is probably caused by the
CursorHold/CursorHoldIcallbacks, which trigger after an inactivity delay, mine is after 4 seconds of no keyboard activity. See:help CursorHoldAs a temporary workaround you could
:set updatetime=500in your ``.vimrc`. This also makes vim write its swap file much sooner.Taluu commentedon Aug 5, 2019
I also have to always input something (even only a
hdoes thew rtrick) for vdebug to show the interface.BlackIkeEagle commentedon Aug 5, 2019
@JasonWoof Yes I always run vim in the terminal and I very occasionaly have this issue. I will look into it if I can find something. I shortly looked at the channel stuff but have to figure out if this is possible directly in python.
ltgouvea commentedon Oct 31, 2019
I've been experiencing this issue everytime I use vdebug (currently on deepin-terminal, but I'll test some others later) 🤔 @BlackIkeEagle Please, what terminal are you using?
drasill commentedon Nov 4, 2019
I have the same issue, not occasionally though, but every time.
I'm using
neovimonterminology.BlackIkeEagle commentedon Nov 4, 2019
@ltgouvea I'm mostly using termite, but also konsole (kde) and gnome-terminal, there is a need for a solution to trigger the debugging interface once a connection is there, but I did not take the proper time to look into it
JasonWoof commentedon Nov 4, 2019
I think this bug is less evident/reproducible on graphical instances of Vim because vdebug checks if it should start the debugger interface when the FocusGained event fires. Terminals don't notify vim about focus, hence needing to press a key in non-graphical vim instances.
mkindred commentedon Jul 21, 2020
I'm experiencing this nearly 100% of my debug sessions. Currently using gnome-terminal.