亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

使用 VS Code 調試 php:無法附加到瀏覽器

使用 VS Code 調試 php:無法附加到瀏覽器

PHP
qq_笑_17 2023-11-03 16:51:53
我已經按照此處的說明安裝了 xdebug:http://xdebug.org/wizard我還安裝了 Chrome 擴展調試器現在我選擇 index.php 文件并啟動調試器,但出現以下錯誤:這是lunch.json的內容這是我添加到 php.ini 的配置xdebug.remote_enable = 1xdebug.remote_autostart = 1zend_extension = /usr/lib/php/20170718/xdebug.so更新:我已添加xdebug.remote_log=/tmp/xdebug.log到 php.ini,這是我收到的錯誤:[3569] I: Connecting to configured address/port: localhost:9000.[3569] W: Creating socket for 'localhost:9000', poll success, but error: Operation now in progress (29).[3569] E: Could not connect to client. :-(
查看完整描述

1 回答

?
30秒到達戰場

TA貢獻1828條經驗 獲得超6個贊

Lunch.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

? ? ? ? },

? ? ? ? {

? ? ? ? ? ? "name": "Launch currently open script",

? ? ? ? ? ? "type": "php",

? ? ? ? ? ? "request": "launch",

? ? ? ? ? ? "program": "${file}",

? ? ? ? ? ? "cwd": "${fileDirname}",

? ? ? ? ? ? "port": 9000,

? ? ? ? ? ? "runtimeExecutable": "/usr/bin/php.exe"

? ? ? ? }

? ? ]

}


查看完整回答
反對 回復 2023-11-03
  • 1 回答
  • 0 關注
  • 505 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號