- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 177
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
Extension seems to be ignoring breakpoints #242
Comments
i've exactly same issue with same output |
Did you check if other types of breakpoint works, i.e. putting in "xdebug_break()", or runtime errors. |
@oniisaki |
@oniisaki for me xdebug_break() worked, but the breakpoint on VSCode are ignored anyway, i don't believe is the PHP version im using PHP7.1 and that's the one i've been using before when it worked also using |
It's because of VS Code v1.20.x. This update broke the functionality of Xdebug plugin. Try to downgrade to v1.19 (https://code.visualstudio.com/updates/v1_19) |
I'm having issues with this also. I've rolled back to VS Cdoe 1.19.3 but my breakpoints are still not triggering. I do see VS breaking on exceptions but breakpoints are not happening. Is there a special way to rollback VSC? Do I have to uninstall first or something? Edit: I finally figured out that some of the changes to my launch.json that I had made when trying to get 1.20 to work do not work with 1.19. Putting this here in case it helps someone else. Specifically I had changed pathMapping to use an absolute path. Changing it back to ${workspaceFolder} got me my breakpoints back.
|
Hey guys, I've managed to make it work properly. For some reason, even though logs show that the connection was successful, it does not connect properly. My solution was port forward with ssh:
I don't know why I need to port forward to the same port, but hey it works... Then it connects for both 1.20 and 1.19 BUT 1.20 ignores breakpoints all together - only possible to trigger debugging by including 1.19 works perfectly :) (tested on 1.19.1) |
I found a clue for the solution. at first, in my case:
; xdebug settings
zend_extension=xdebug.so
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_connect_back = 1
xdebug.remote_log = /vagrant/xdebug.log pathMappings and the behavior patterns are as follows.
in worked case, php file url in xdebug log is start with "file:///vagrant/...". it's correct file url in VM.
and not worked case (
I hope this becomes a hint to solve problem. I want to sharing workspace wide launch.json in team. |
TL;DR the workaround for windows users
ex)
|
I will close the issue, because the solution is known and the bug is not coming from xdebug extension. |
Now I have solution for this case.
Tested on host (Window 10, VSCode 1.12.1) and remoted server (Vagrant, Laravel Homestead, PHP 7.2.4, Xdebug 2.6.0) |
PHP version: 7.0.23
XDebug version: 2.4.0
Adapter version: 1.12.1
Your launch.json:
XDebug php.ini config:
XDebug logfile (from setting
xdebug.remote_log
in php.ini):Adapter logfile (from setting
"log": true
in launch.json):<- launchResponse
Response {
seq: 0,
type: 'response',
request_seq: 2,
command: 'launch',
success: true }
Code snippet to reproduce:
Testing xdebug for remote host debugging. It seems like xdebug is getting the connection, however on vscode side nothing at all.
I thought maybe absolute path is needed for local files(i've read some issues here), but that doesn't help in this case.
The text was updated successfully, but these errors were encountered: