The principle Attilax Summary of remote Debugging for atitit Web remote
The JVM is the VM that opens a debug port, and then the IDE connects first: Then execute the URLandthe VM will communicate with the IDE .
Phpof theXdebug Port 9000is inPhpstoremOpen the ... If you performURL, it will also startDebug.. Must be pre-connectedIDEand theApacheto be able to. UsePhpstormOpenDebug PageReady , pre-connected. And then justXdebugYou can contactIDEOpen the9000 Debug Portthe connection has been debugged.
Connection creation
for a static IP, single developer
Use Xdebug remote debugging, Xdebug as a program embedded in PHP, playing the role of the client, and the IDE as the server. The following dynamic diagram shows the process of establishing a connection.
- Service-side IP is 10.0.1.2, using the HTTP protocol with Port 80
- IDE on a machine with an IP address of 10.0.1.42, Xdebug.remote_host is set to 10.0.1.42
- The IDE listens on port 9000, so Xdebug.remote_port is set to 9000
- HTTP requests originate from the server running the IDE
- Xdebug Connecting to 10.0.1.42:9000
- Debug start Run, return HTTP response
use non-stationary IP, multiple developers
If the xdebug.remote_connect_back directive is used, the connection creation process is different:
- Service-side IP is 10.0.1.2, port is 80
- The IDE is running on a computer with a dynamic IP, so setting debug.remote_connect_back to 1
- The IDE listens on port 9000, so the configuration Xdebug.remote_port is 9000
- Send HTTP request, Xdebug detects IP address in HTTP header
- Debug starts running, generating HTTP response
HTTP Debugging session
when using a browser to At debug time, Xdebug supports the ability to use cookies to track conversations.
- When the parameter Xdebug_session_start=name is appended to the URL address, Xdebug will set a parameter named Xdebug_session with a value of Xdebug_session_start Specifies the name of the Cookie. The expiration time of this cookie is one hours. The DBGP protocol also passes an identical value in the initialization package so that it can connect to the client that has the Idekey property set.
- When a GET (POST) variable named Xdebug_session_start or Xdebug_session cookie is set, Xdebug will attempt to connect Debugcliet
- to stop the xdebug session, just pass a xdebug_session_stop parameter, and Xdebug will no longer attempt to connect to debugclient.
Multi-User debugging
Xdebug only allows you to use the specified IP address (xdebug.remote_host) for remote debugging Connections . He will not automatically connect back to the browser to run access to the machine IP unless you are using xdebug.remote_connect_ Back command.
If your developers are developing on different projects on the same server, you can use the The. htaccess feature in each Apache directory specifies the xdebug.remote_host directive, which configures the Php_value xdebug.remote_host=10.0.0.5. However, if multiple developers are developing on the same code,the. htaccess will not be able to complete this feature.
There are two solutions to this problem. The first is that you can use the DGBP agent, and for how to use this agent, check out the multi-user debugging article. You can download this agent at ActiveState's site. Here are more documents in the Komodo FAQ.
The second scenario is that you can use the Xdebug.remote_connect_back configuration item (introduced after Xdebug 2.1).
Xdebug.remote_connect_back
Type:boolean, Default value:0, introduced in Xdebug > 2.1
If allowed, the Xdebug.remote_host setting will be invalidated andXdebug will attempt to connect to the debug client of the computer sending the HTTP request. He will check the $_server[' REMOTE_ADDR '] variable to find the IP address used. Note that there are no filters available here, and anyone connected to webserver can start a debugging session, even if their IP address is not the same as xdebug.remote_host.
author :: nickname : old Wow's paw Claw of Eagle idol iconoclast image-smasher
Bird King "Bird Catcher Kok devout pious religious defender Defender of the Faith. Caracalla Red Cloak Caracalla Red Cloak King of the Beast
abbreviation:: Emir attilax Akbar Emile Atiraca
Full Name:: Emir Attilax Akbar bin Mahmud bin Attila bin Solomon bin Adam Al Rapanui Emile Atilax Akbaben Maham Solomon Ben Adam Arrapa Ms Nooyi
Common name: Etila (Ayron), Email:[email protected]
title:Head of Uke headquarters , founder of global Grid project,
Uke Friendship Association President UKE Hunting Association President Emir Uke Tribe chief Grand Chief,
Uke , Minister of Religious and Cultural Integration Affairs, Vice-Chairman of the Uke Reformation Commission
Uke System and chairman of the major conference committee,uke Security Department Chief Brigade , uke System Inspection Committee vice president,
Uke chief CTO Software Division Director of Technical department deputy Director of Research and Development department Director of Product department deputy Manager Project department deputy manager uke Science and Technology Research Institute Dean uke c6> Software Training Master
Uke Polynesia District chain Head of the region of Tonga Kingdom director of the Uke Kerr Glen, chain head, Line Is. District,uke Bouvet and South Georgia and South Sandwich Is. regional chain head
Uke, chairman of the Association of Software Standardization , Vice president of Uke Database and storage Standardization Association
Uke , founder of Uke Hospital and medical School, vice president of lifelong education school
UEC , President of Uecip , director of uke Document retrieval Department, head of Department of Image processing machine Vision
Uke, chief Dean of the School of image processing and machine vision
Uke Outdoor Sports Association chairman of the resort chief Mayor Uke Press editor
reprint Please indicate source:Attilax 's column http://blog.csdn.net/attilax
http://www.cnblogs.com/attilax/
--atiend V9
The principle attilax Summary of remote Debugging for Atitit Web remote