vscode-php-debug | PHP Debug Adapter for Visual Studio Code 🐞⛔ | Code Inspection library
kandi X-RAY | vscode-php-debug Summary
kandi X-RAY | vscode-php-debug Summary
PHP Debug Adapter for Visual Studio Code
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of vscode-php-debug
vscode-php-debug Key Features
vscode-php-debug Examples and Code Snippets
Community Discussions
Trending Discussions on vscode-php-debug
QUESTION
I want to configure VS Code Xdebug plugin to work with Xdebug inside a WordPress Docker container.
I have an issue with the ports.
If I specify on the WP-with-Xdebug container in the "ports" section of the docker-compose.yml file:
...ANSWER
Answered 2021-Apr-23 at 11:45I think that both the WP container with Xdebug in it and the VS Code plugin want to use the same port on the host 9009
Yes, that nails it on the head. It is Xdebug that makes the connection, so there is no reason to expose the 9000/9009 port on the WordPress containers as that is for incoming connections. You can remove that expose line.
QUESTION
Expected behavior:
I have multiple PHP projects on different servers, usually I debug them with PhpStorm which allows me to configure path mappings for remote debugging per server. Thus I can have the same remote paths e.g. /var/www/html
for different servers.
Problem description:
So far I have been unable to configure multiple servers with the same remote paths using VSCode.
I use the most used php-debug plugin for VSCode and have not found any information regarding this issue on the projects GitHub page or anywhere else.
Currently I do not think configuring multiple remote servers using VSCode is possible at this time but in case someone knows a way I would appreciate it.
Current configuration:
With the following configuration I can only debug one project at once and have to change the paths manually when I want to debug another project on another server with the same remote paths.
...ANSWER
Answered 2020-Jul-11 at 21:20Step 1
To debug multiple websites with VSCode first add multiple configurations to the vscode-php-debug extensions config (Run->Open Configurations) with different names.
QUESTION
So, I'm trying to get the vscode-firefox-debug to play.
It, vscode-firefox-debug
, claims to be compatible with vscode remote
.
How do I configure this thing, to work with my remote?
All my development is done on a remote headless server, running Slackware64 14.2
Let's call that box www.example.com
.
My local box is a Windows 8.1 x64 Pro
with:
Firefox 69.0.1 (64-bit)
ANSWER
Answered 2020-Feb-21 at 16:59Follow the link to help you:
https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug
Example to run on server to start manually xdebug while debug by SSH the file on local VS code IDE is:
QUESTION
I have been using XDebug with PHP Version 7.0.* for the last 6 months on a MAC using remote debugging to a Docker container.
I was running an older version of docker that was using VirtualBox to VM for docker, all was working fine.
I recently updated docker to version 17.03.1 and have had nothing but issues with xDebug. I have contacted the creator of vscode-php-debug via an issue on his repository and he then pointed me to take the issue up with xdebug and or docker.
My issue is the following:
XDebug is running and working on my container, the xdebug log shows that it connects to my IDE but it simply closes the connection as if there are no breakpoints when I have breakpoints set in VSCode.
The issue I posted on vscode-php-debug can be found here
Which has a copy of my xDebug logs and VSCode debug logs... It shows that the connection is made but no breakpoints are hit.
I have read around a few blogs that docker now needs a loopback ip created for the connection to xdebug to work, which I have also tried and failed.
I'm finding it surprisingly hard to debug without a debugger after using one for so long.
I have tried many configs, reinstalled, rebooted, rebuilt images/containers and even have tried the docker and xdebug irc channels on freenode without any success.
...ANSWER
Answered 2018-Jul-25 at 14:05EDIT-2 2018
The remote_host
value can now be changed to support all platforms:
QUESTION
Debugging PHP with Visual Studio Code and XDebug on the server. The server-side config goes:
...ANSWER
Answered 2017-Oct-22 at 14:12It's a bug in the PHP Debug extension, it treats Windows drive letters in a case sensitive manner. Changing the value of localSourceRoot
to y:\
helped.
https://github.com/felixfbecker/vscode-php-debug/issues/197 https://github.com/felixfbecker/vscode-php-debug/pull/198
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install vscode-php-debug
Install Xdebug I highly recommend you make a simple test.php file, put a phpinfo(); statement in there, then copy the output and paste it into the Xdebug installation wizard. It will analyze it and give you tailored installation instructions for your environment. In short: On Windows: Download the appropriate precompiled DLL for your PHP version, architecture (64/32 Bit), thread safety (TS/NTS) and Visual Studio compiler version and place it in your PHP extension folder. On Linux: Either download the source code as a tarball or clone it with git, then compile it. Or see if your distribution already offers prebuilt packages.
Configure PHP to use Xdebug by adding zend_extension=path/to/xdebug to your php.ini. The path of your php.ini is shown in your phpinfo() output under "Loaded Configuration File".
Enable remote debugging in your php.ini: For Xdebug v3.x.x: xdebug.mode = debug xdebug.start_with_request = yes For Xdebug v2.x.x: xdebug.remote_enable = 1 xdebug.remote_autostart = 1 xdebug.remote_port = 9000 There are other ways to tell Xdebug to connect to a remote debugger, like cookies, query parameters or browser extensions. I recommend remote_autostart (Xdebug v2)/start_with_request (Xdebug v3) because it "just works". There are also a variety of other options, like the port, please see the Xdebug documentation on remote debugging for more information. Please note that the default Xdebug port changed between Xdebug v2 to v3 from 9000 to 9003.
If you are doing web development, don't forget to restart your webserver to reload the settings.
Verify your installation by checking your phpinfo() output for an Xdebug section.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page