Answer the question
In order to leave comments, you need to log in
How to set up XDEBUG in VS CODE?
Good afternoon.
Can't set up VS Code to work with xdebug while Netbeans handles breakpoints.
[xdebug]
; 2.6
zend_extension = "d:\wamp\bin\php\php7.1.9\zend_ext\php_xdebug-2.6.0-7.1-vc14-x86_64.dll"
; -not_working- zend_extension = "d:\wamp\bin\php\php7.1.9\zend_ext\php_xdebug-2.6.0-7.1-vc14.dll"
; -not_working- zend_extension = "d:\wamp\bin\php\php7.1.9\zend_ext\php_xdebug-2.6.0-7.1-vc14-nts.dll"
; -not_working- zend_extension = "d:\wamp\bin\php\php7.1.9\zend_ext\php_xdebug-2.6.0-7.1-vc14-nts-x86_64.dll"
xxdebug.remote_autostart = on
xdebug.remote_enable = on
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.remote_handler = dbgp
xdebug.remote_mode=req
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "d:\wamp\bin\php\php7.1.9\zend_ext"
xdebug.remote_log = "d:\wamp\bin\php\php7.1.9\zend_ext\xdebug.log"
{
// 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": [
// {
// "type": "chrome",
// "request": "attach",
// "name": "Attach to Chrome",
// "port": 9222,
// "webRoot": "${workspaceFolder}"
// },
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"stopOnEntry": true,
"log": true
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
<?php
$a = 1 + 1;
echo $a;
phpinfo();
Answer the question
In order to leave comments, you need to log in
Maybe someone will come in handy:
--- configure xDebug [php.ini]
zend_extension = "d:\wamp\bin\php\php7.1.9\zend_ext\php_xdebug-2.6.0-7.1-vc14-x86_64.dll"
xdebug.remote_autostart= on
xdebug.remote_enable=on
xdebug.remote_enable=1
xdebug.remote_handler="dbgp"
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9001
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
--- VS CODE launch .json
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"hostname": "127.0.0.1",
"port": 9001
}
]
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question