Skip to content

Request: Non-blocking listener #58

qstrahl opened this Issue Mar 5, 2013 · 3 comments

3 participants

qstrahl commented Mar 5, 2013

Having to press F5 to start listening (and nothing else) for 20 seconds and then refresh the page is a bit of a nuisance, and actually can be very frustrating. Consider this: I have a server-side API server based on PHP and a javascript client that interacts with the API server on the user's behalf. Understandably, the javascript client makes a lot of AJAX requests to the API server. Unless I have superhuman timing (or introduce delays/triggers all over my code) I can't catch the right request to debug - furthermore, while I'm debugging, any other requests are going to go straight through to the server. The end result is that, usually, the first request that is made gets debugged and the rest just slip by. has addressed this issue; I don't know how it works in the back, but this is what the user sees: in the bottom-right, there is a bit of information about the state of the debugger; whether it is idle, listening, or connected (plus how many connections are pending). F5 toggles the state of the debugger between listening and idle. While listening, the debugger does not interrupt the usability of vim at all; only once a connection is captured does debugging start. All connections are captured and queued so you get through them all.

I don't know how much work would be involved in implementing this, but it would absolutely make this plugin for me. If it is at all possible, I want it. Please. I'll give it a shot myself if you rather wouldn't, just let me know.

joonty commented Mar 6, 2013

You're actually not the first person to suggest this. All the way back in #19, a discussion around continuous mode lead to this very suggestion coming up. I think it would be fantastic, and when I started Vdebug I tried but failed to get it working. However, I've wanted to revisit it for a while now, and I marked #19 for the elusive version 1.4.0 milestone (which is yet to be started).

I welcome contributions if you're up for it, otherwise I'm afraid you're at the mercy of my calendar :-S

Despite the overlap of the issues, I'll keep this one open since it is more specifically and obviously about a non-blocking listener.


SunMar commented Aug 11, 2014

This indeed would be a great enhancement. If you ever were to find the time for it of course :). Currently I have both DBGPavim and Vdebug installed (using different aliases to load the plugin). I like Vdebug a lot more but keep DBGPavim around for its non-blocking feature to catch AJAX requests.

If it ever gets supported in Vdebug, an improvement in my opinion would be to instead of queuing the requests, to load them in their own tab. Say you have 3 AJAX calls it would be nice to get 3 tabs in which you can debug them simultaneously.

joonty commented Aug 29, 2014

This is actually almost ready, I just need to polish it up a bit. If you want to test what's there, give the version-2.x branch a go.

Thanks for your comment @SunMar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.