diff --git a/.vscode/launch.json b/.vscode/launch.json index adff644..7c09290 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "name": "Listen for XDebug", "type": "php", "request": "launch", - "port": 9000 + "port": 9003 }, { "name": "Launch currently open script", @@ -13,7 +13,7 @@ "request": "launch", "program": "${file}", "cwd": "${fileDirname}", - "port": 9000 + "port": 9003 } ] } \ No newline at end of file diff --git a/wiki/Developing-PHP-in-Visual-Studio-Code-for-Dummies.md b/wiki/Developing-PHP-in-Visual-Studio-Code-for-Dummies.md index 8398330..b3653f6 100644 --- a/wiki/Developing-PHP-in-Visual-Studio-Code-for-Dummies.md +++ b/wiki/Developing-PHP-in-Visual-Studio-Code-for-Dummies.md @@ -31,8 +31,8 @@ extension=openssl 1. Extract it to `C:\php\ext` 1. Open `c:\php\php.ini` and append the XDebug section to the end of the file (if it's already there, adjust it accordingly): - ```plain - [XDebug] + ```ini + [XDebug] ; for XDebug v 2.x.x zend_extension = php_xdebug-3.1.3-8.0-vs16-nts-x86_64.dll ; Use the name of the DLL you copied to ext folder xdebug.default_enable = 1 xdebug.scream = 1 @@ -43,7 +43,25 @@ extension=openssl xdebug.remote_enable = 1 xdebug.remote_autostart = 1 xdebug.remote_host=127.0.0.1 - xdebug.remote_port = 9000 + xdebug.remote_port = 9003 + ``` + + ```ini + [XDebug]; for XDebug v3.x.x https://stackoverflow.com/questions/43783482/visual-studio-code-php-debugging-not-working/70351090#70351090 + xdebug.mode = coverage ; or debug + xdebug.start_with_request = yes + zend_extension = "C:\php\ext\php_xdebug-3.2.2-8.2-vs16-x86_64.dll" ; Use the name of the DLL you copied to ext folder + xdebug.stopOnEntry = true + xdebug.profiler_enable = off + xdebug.profiler_enable_trigger = Off + xdebug.profiler_output_name = cachegrind.out.%t.%p + xdebug.output_dir ="c:\php\tmp" + xdebug.show_local_vars=0 + xdebug.remote_handler = "dbgp" + xdebug.client_host = "127.0.0.1" + xdebug.log = "C:\php\tmp\xdebug.txt" + xdebug.client_port = 9003 + xdebug.remote_cookie_expire_time = 36000 ``` 1. Add `c:\php` to your PATH environment variable