Can php's xdebug debug Ali CVM remotely?

Local breakpoint debugging in php development and breakpoint debugging on servers deployed with the company"s LAN are all kinds of ok, but I have tried to debug the server on Ali Cloud several times without success. No matter how it is configured, it doesn"t work. I think it"s my wrong configuration or something. I would like to ask you whether any of them have been successfully configured?

Apr.05,2021

if the framework is not used, you can turn on php's error reporting mechanism to debug bug; If you use a framework, the general framework will have debug mode, and some errors will be recorded in the log. You can check the log to locate your problem


, but it is very troublesome to do IP mapping.
you have been bothering me for a week and found a lot of solutions. In the end, I still think that putting the code into local debugging is the best, the easiest
, but then again, Xdebug, a framework like YII, can't be debugged at all, so you might as well use your own debugging mode.
other frameworks or echo is more reliable, personal experience, I hope you consider!


cannot be adjusted directly.

The principle of

xdebug is that when the PHP code to be debugged is executed, the PHP (xdebug) parser on the server connects to your local listening port.
but on aliyun, you can't connect to your local, unless you already have a public network ip.

.

I also encountered the same problem. After the configuration, the Aliyun security group also opened the port, and the router port mapping was done locally. That is, the debugging is not successful!

Menu