-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Remote host debugging not working #14
Comments
remote host debugging will come in the next update, but as long as the source files are on your PC it should work currently. You dont need a chrome extension if you set |
Could you please set |
Hi, There is no log output in the debug file. Only this:
this is the debug config in my
This config works without a hitch for intelliJ Idea without any additional debug config setup. I just click on the "Listening for PHP Debug Connections", enable the debug extension in chrome, go to my local domain URL and the IDE catches the connection and asks for confirmation. Then it's just a matter of navigate my app to a point where there's a break point and the the IDE stops there an debugging begins. This doesn't happen with your VSCode extension. I start the debugging clicking the play icon and when navigating in my app I only see very short lived entries in the call stack pane that show and alms immediately go away and never stops in breakpoints. |
You are right, if it is running in a VM that means the file paths in VS Code and in XDebug differ, which is not supported in the currently released version (but is on master already).
See, XDebug would normally report a |
The thing is the debugger is not getting updated for the activities. It only has the entry I indicated in my last post and nothing else has been written on it since then. I have been debugging at IntelliJ, navigated the app with the browser debug extension enabled and nothing gets written to the log. I tried to edit the lauch.json file addind the var
|
Yeah that is because we are trying to send a run command even though we dont have a connection yet. I really need to see some logs to help you... Are you sure that
Also, please
|
The server was properly restarted by means of command The xdebug version is the one that comes with the homestead vm. I can't upgrade in this moment because of a project I'm working on. I don't get any kind of xdebug logs with intelliJ either. here are the phpinfo section regarding xdebug in my homestead vm. |
The settings seem fine. I don't know why you cannot get logs, but your setup will not work currently anyway because remote host debugging is not released yet. If you want to try out the feature, what you could do is clone this repo, put it in your extension folder and run |
Thank you. I'll try it later and keep you informed about the results. When are you planing to release this feature oficially? :) |
I initially thought about releasing it together with conditional breakpoints after the Code January iteration. But I might actually release it earlier. I just had some problems with debugging lately and dont want to push a buggy update, and there are still open issues and PR |
@mogarick Just pushed an important commit, you might want to pull that |
I'll check it out |
Hi again @felixfbecker 0.1. Removed current extension version previously installed from VS Code Extensions commands.
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"serverSourceRoot": "/home/vagrant/projects/myproject/Development/cigniter/coin",
"localSourceRoot": "./"
}
]
}
Here's a Screenshot where you can see my break point and the extension running and listening: Here's again my xdebug config section for php.ini
My xdebug file has more content but I'm still confused about it because some times it works and some times nothing gets written on it while debugging.
I hope you can help me to make this work because I don't like the burden of running IntelliJ for debugging PHP. It eats lots of memory resources. |
@mogarick Your settings seem fine. The logs unfortunately are mostly from IntelliJ, I can see the max_children gets set to 100, while this adapter sets it to 9999. But the last logs with "Could not connect to client" might be from us. I don't know how Maybe the issue is that the TCP server we set up listens on Since there are no logs, all I can ask you to is to debug this adapter (see readme) to actually see where the issue is. |
@mogarick can you try adding an xdebug_break() statement to your code and see if at least it starts working?@felixfbecker I'd be glad to give you access to a remote endpoint for testing. Send me an email to [email protected] and I'll share instructions with you. |
Hey @mogarick Can you update your php.ini and make Apparently php-fpm and nginx rely on this port for communication which may explain why you're seeing |
@gianugo Thanks for the offer, but I just set up my own. Remote host debugging is working fine for me, but I only tested from Windows to Windows. |
@AndrewNatoli I'll change that but I don't think it changes anything because in my config nginx and php-fpm are communicating via unix socket so the port 9000 is free AFAIK. @gianugo I'll add it and report back the results. Thank you for the support. |
tl;drI updated to the last version of vscode-php-debug and played with permissions and xdebug params in config file but I can't make it work yet. FindingsThe With this config, vscode-php-debug doesn't catch a thing:
With this config, vscode-php-debug does appear to work but crashes a few seconds later (image attached):
I can start the debugger again with no troubles. With this config, vscode-php-debug does work and stops in break point
but eventhough it is "stopped" at break point, this is only virtually in VSCode because the php script continues execution and finishes in the browser. And other weird thing is that it skips the first 2 break points and stops in third one.
If I step over en VS Code nothing happens, just the php script finishes but it's weird because in fact the script already executed without stopping. I can execute the script again in the browser and the debugger "stops" virtually again in the third break point. @gianugo I added the function Other problem: if I click the The way I can stop it is clicking After that any attempt to start the debugger again fails with the same error: Here is the debug file attached: @AndrewNatoli as you can read, the port was not the problem but I also changed it to 9004 for experimentation and the same problems happened. |
@mogarick Great that you got the logs working. I'm taking a look at it right now, I can see that the first encounter between VS Code and XDebug is at line 745. Whats weird is that all commands are sent multiple times. But from your screenshots I can see that you actually got a whole lot of requests going in parallel. These are emulated as threads for VS Code, and as mentioned in the readme, this is still extremely buggy because of some issues in VS Code (any maybe some are my fault too, the lines are blurry). I would ask you to create a dead-simple test.php instead with just a few echo statements and to put that in your webroot and test against that, so we can narrow down the issue. |
These logs confuse me:
|
@mogarick I can reproduce your issue with not stopping on breakpoints. I'll look into it. |
@mogarick Could you try latest master please, with a simple php file? |
It works @felixfbecker!!! (At least in my initial test with the same file ;) ) Here you have a clean log for a session with a very simple PHP file for whatever purposes you may need it. Thank you!! 👍 😄 |
I will make another patch release then :) |
This bug is back, not working for me again URL : http://hackerrank.app/test.php?XDEBUG_SESSION_START=VSCODE this is my xdebug.txt
/etc/php/7.1/mods-available/xdebug.ini
not breaking, i also try adding
also changing the port to 9001 and nothing Php Info
launch.json |
Please open a new issue. |
I'm trying to make this work with the zero config chrome extension for debug but it doesn't stop on the breakpoints. I can see in the callstack that something happened but it then disappears.
I also have a custom local domain (not localhost) and I'm using an idekey value. Are this options and way of debugging currently supported?
The text was updated successfully, but these errors were encountered: