![]() ![]() ignore: An optional array of glob patterns that errors should be ignored from (for example **/vendor/**/*.php).log: Whether to log all communication between VS Code and the adapter to the debug console.pathMappings: A list of server paths mapping to the local source paths on your machine, see "Remote Host Debugging" below.stopOnEntry: Whether to break at the beginning of the script (default: false).port: The port on which to listen for Xdebug (default: 0).hostname: The address to bind to when listening for Xdebug (default: all IPv6 connections if available, else all IPv4 connections).It will launch the currently opened script as a CLI, show all stdout/stderr output in the debug console and end the debug session once the script exits. This setting is an example of CLI debugging. If you configured Xdebug like recommended above, everytime you make a request with a browser to your webserver or launch a CLI script Xdebug will connect and you can stop on breakpoints, exceptions etc. This setting will simply start listening on the specified port (by default 9000) for Xdebug. A new launch configuration will be created for you with two configurations: In your project, go to the debugger and hit the little gear icon and choose PHP. Verify your installation by checking your phpinfo() output for an Xdebug section. If you are doing web development, don't forget to restart your webserver to reload the settings. There are also a variety of other options, like the port (by default 9000), please see the Xdebug documentation on remote debugging for more information. I recommend remote_autostart because it "just works". There are other ways to tell Xdebug to connect to a remote debugger than remote_autostart, like cookies, query parameters or browser extensions. ![]() The path of your php.ini is shown in your phpinfo() output under "Loaded Configuration File".Įnable remote debugging in your php.ini: dll on Windows) that needs to be installed on your server.Ĭonfigure PHP to use Xdebug by adding zend_extension=path/to/xdebug to your php.ini. This extension is a debug adapter between VS Code and Xdebug by Derick Rethan. Install the extension: Press F1, type ext install php-debug. ![]()
0 Comments
Leave a Reply. |