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
Set breakpoints in any file. #82
Comments
You can configure Xdebug to behave in a variety of ways. I like to have it enabled all the time on my local machine, because only I do development there. Here's a helpful tool to generate bookmarklets you can use to toggle whether or not your browser talks to Xdebug. There's also a few helpful instructions regarding configuration on the Xdebug installation page. Let me know if this doesn't address your problem. |
I have the Chrome extension to toggle the XDEBUG_SESSION_START GET parameter, which means I can only start the Xdebug session from the URL. As for the first post, I guess I wasn't being clear, so here is an (overly simple) example:
For this form, once I hit submit, how do I debug |
Vdebug should then break at your breakpoints in |
Wow, ok I don't know why, but I remembered I couldn't just set breakpoints in any random php file (maybe Vdebug wasn't being loaded?). I feel really stupid now. Thanks @qstrahl. I just tested your method with AJAX calls too and it works. The only thing I still haven't figured out is how to debug AJAX calls that loads during the beginning of the page. If I listen on Vdebug and reload the page, it will start debugging on the actual page itself instead of the individual AJAX calls. |
Ok, I was able to reproduce the error. If the PHP files are all local, then @qstrahl's method works perfectly, but if I try to set a breakpoint on a file that is remotely mounted, it gives this error:
I can tell something is wrong with the filename since it's repeating
Here is my Vdebug config in my
|
This is a known issue and a non-blocking listener is in production to resolve it (see #58)
Hm, this sounds like a remote pathing issue more than anything. Possibly related to #54, but this is outside my scope for now. @joonty may have a better idea of the problem at hand, here.
Can you give a more detailed description of what exactly doesn't work and under what conditions this happens? |
After reading #54, it seems that How do I install that branch with Vundle (and override the original Vdebug installation)? I feel I should use Vundle since I tried to manually install Vdebug before and it didn't work for me (I couldn't even get Currently I have |
Hi @hobbes3, you would probably be better off using the There's no way of selecting the branch in Vundle, but you can just cd to As for the file path issue, @qstrahl is absolutely right, this was tackled in #54. It should be fixed in Cheers |
Oh cool, I didn't know bundles were also part of a git repo. But I must have done something wrong with checking out the remote branch since it's still showing the same error when setting a breakpoint on a file that's remotely mounted. This is what I did:
Then on Vim I typed
which is weird since I did type |
You shouldn't have to do |
Thanks for all your help so far, @qstrahl. I tried |
As long as your local If you're completely up to date and using the correct branch and it still isn't working -- silly question, but I have to ask -- did you restart vim after updating? If no, try that. If yes, we have a new problem on our hands. Thanks a lot for helping us get to the bottom of this issue. |
I did another
|
The merge isn't your fault; I got it, too. The As you've said it works now, I'm closing the issue. |
Hey guys, this was all my fault. I noticed a problem with the dev branch, where commits had been duplicated back to the beginning of time. To fix it I had to do the biggest, meanest interactive rebase ever. I got it sorted in the end, but that would account for the history rewrite. I also noticed that I was completely wrong, and @hobbes3 was completely right - the Sorry @hobbes3, and sorry @qstrahl 😺 |
Aha, that explains it all. |
Sorry, I know this isn't really a bug or an enhancement post, but more like a general question.
So far I figured out how to use Vdebug on all PHP file except for PHP files that handle POST variables (especially form submissions). For AJAX calls, I can just copy and paste the URL with the GET variables to start a Xdebug session.
Is there a way to open a form handling PHP file that you know will be called, set a breakpoint, then submit the form and start a Xdebug session at the breakpoint or file?
The text was updated successfully, but these errors were encountered: