2017-10-21 166 views
0

我想在VS代碼中設置PHP調試。我似乎無法讓聽衆迴應。這裏是我的設置:問題得到停止使用PHP調試1.11.1由Felix Becker停止點

的php.ini:

[XDebug] 
xdebug.remote.enable=1 
xdebug.remote.autostart=1 
zend_extension="C:\xampp\php\ext\php_xdebug-2.5.4-5.5-vc11.dll" 

的httpd-vhosts.conf

<VirtualHost *:80> 
    DocumentRoot "E:/gator4123/public_html" 
    ServerName localhost 
</VirtualHost> 
<VirtualHost *:80> 
    DocumentRoot "E:/gator4123/public_html/winemakerssoftware.com" 
    ServerName wms.localhost 
</VirtualHost> 
<VirtualHost *:80> 
    DocumentRoot "E:/gator4123/public_html/dianestevenslaw.com" 
    ServerName law.localhost 
</VirtualHost> 
<VirtualHost *:80> 
    DocumentRoot "E:/gator4123/public_html" 
    ServerName rwd.localhost 
</VirtualHost> 

launch.json:

{ 
    // Use IntelliSense to learn about possible attributes. 
    // Hover to view descriptions of existing attributes. 
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 
    "version": "0.2.0", 
    "configurations": [ 
     { 
      "name": "Listen for XDebug", 
      "type": "php", 
      "request": "launch", 
      "port": 9000, 
      "serverSourceRoot": "E:/gator4123/public_html", 
      "localSourceRoot": "${workspaceRoot}/", 
      "log": true 
     }, 
     { 
      "name": "Launch currently open script", 
      "type": "php", 
      "request": "launch", 
      "program": "${file}", 
      "cwd": "${fileDirname}", 
      "port": 9000 
     } 
    ] 
} 

我的物理根位置:

E:\gator4123\public_html 

我已經嘗試了這兩個URL並得到相同的迴應,死氣沉沉。當我開始調試時,連接實現消息後沒有輸出。

啓動響應:<- launchResponse Response { seq: 0, type: 'response', request_seq: 2, command: 'launch', success: true }

http://localhost  
http://rwd.localhost 

有什麼我錯過了什麼?

回答

0

好吧,不是最複雜的答案,但我確實得到它的工作。

首先是XAMPP升級到最新版本,其中包括PHP 7.1.1
下一頁是重新安裝了XDebug與庫相匹配的PHP 7.1.1
最後這裏是我的新文件設置

的php.ini:

[XDebug] zend_extension = C:\xampp\php\ext\php_xdebug-2.5.4-7.1-vc14.dll xdebug.remote_enable = 1 xdebug.remote_autostart = 1

HT TPD-vhosts.conf

<VirtualHost *:80> 
    DocumentRoot "E:/gator4123/public_html" 
    ServerName localhost 
</VirtualHost> 
<VirtualHost *:80> 
    DocumentRoot "E:/gator4123/public_html/winemakerssoftware.com" 
    ServerName wms.localhost 
</VirtualHost> 
<VirtualHost *:80> 
    DocumentRoot "E:/gator4123/public_html/dianestevenslaw.com" 
    ServerName law.localhost 
</VirtualHost> 
<VirtualHost *:80> 
    DocumentRoot "E:/gator4123/public_html" 
    ServerName rwd.localhost 
</VirtualHost> 

launch.json:

{ 
    // Use IntelliSense to learn about possible attributes. 
    // Hover to view descriptions of existing attributes. 
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 
    "version": "0.2.0", 
    "configurations": [ 
     { 
      "name": "Listen for XDebug", 
      "type": "php", 
      "request": "launch", 
      "port": 9000, 
      "log": true 
     }, 
     { 
      "name": "Launch currently open script", 
      "type": "php", 
      "request": "launch", 
      "program": "${file}", 
      "cwd": "${fileDirname}", 
      "port": 9000 
     } 
    ] 
} 

易peasy就像說明建議...