在vs-code中使用docker下安裝的php+xdebug進(jìn)行調(diào)試

ctrl+shift+p彈出選擇框

輸入: extensions:install extension

輸入:php debug 安裝

輸入:php litellisense 安裝

然后在上欄工具那里選擇"調(diào)試"->"添加配置",修改內(nèi)容為:

{

? ? // 使用 IntelliSense 了解相關(guān)屬性。

? ? // 懸停以查看現(xiàn)有屬性的描述。

? ? // 欲了解更多信息,請?jiān)L問: https://go.microsoft.com/fwlink/?linkid=830387

? ? "version": "0.2.0",

? ? "configurations": [

? ? ? ? {

? ? ? ? ? ? "name": "Listen for XDebug",

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

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

? ? ? ? ? ? "port": 9007,

? ? ? ? ? ? "pathMappings": {

? ? ? ? ? ? ? ? // "容器中對應(yīng)的項(xiàng)目地址": "本機(jī)項(xiàng)目地址" // 絕對路徑

? ? ? ? ? ? ? ? "/usr/local/nginx/html/": "/usr/local/nginx/html/"

? ? ? ? ? ? }

? ? ? ? },

? ? ? ? {

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

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

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

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

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

? ? ? ? ? ? "port": 9007

? ? ? ? }

? ? ]

}

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容