Hi,
I have installed Local and can get my wordpress site to work, but cannot get the breakpoints to hit when debugging in VSCode.
I followed the steps to setup debugging:
https://localwp.com/community/t/localbyflywheel-xdebug-vscode/11950/9
SETUP
- Install the add-on
- Enable the add-on & Relaunch Local
- Go to the site you want to debug in Local
- Start the site
- Click on the Utilities tab
- Click the “Add Run Configuration to VS Code” link - this will create an xdebug/vscode configuration file inside the app/public folder
Debugging
- Open the app/public folder in vscode
- Start debugging (command/control + shift + p and then type “debug” then click “Debug: Start Debugging”
- Load the site in your browser
I then open my index.php file in VSCode and set several breakpoints. I refresh the site in the browser, but my breakpoints are not hit.
Here is my launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug (Local)",
"type": "php",
"request": "launch",
"port": 9000,
"xdebugSettings": {
"max_children": 128,
"max_data": 1024,
"max_depth": 3,
"show_hidden": 1
}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000,
"xdebugSettings": {
"max_children": 128,
"max_data": 1024,
"max_depth": 3,
"show_hidden": 1
}
}
]
}
When I start my website in Local, the url that appears in my browser is:
http://localhost:10005
I have tried altering the port in my launch.json to 10005, but it has no affect.
Any help would be much appreciated.