php-debug | PHP debugging tools | Code Inspection library
kandi X-RAY | php-debug Summary
kandi X-RAY | php-debug Summary
PHP debugging tools
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 php-debug
php-debug Key Features
php-debug Examples and Code Snippets
Community Discussions
Trending Discussions on php-debug
QUESTION
A recent update (not sure which, I updated yesterday since cancelling updates since end last year) of Visual Studio Code changed behavior of PHP Debug from XDebug (or even with PHP Tools extension from DEVSENSE) now has this 'auto-expand-data' feature, where arrays and objects now shows their values inline of the array/object, which in the case of Magento 2 makes debugging extremely cumbersome now.
I should have just not upgraded!!!
The VS Code would crash more often now when large objects are displayed, because it now wants to auto-expand every single private variable for a Magento 2 object as well
Since the extended feature 'auto-expands' variable values, it is not really clear anymore which are private/protected/public values any more.
Which recent settings are added, and how do we disable this?
ExampleNew:
...ANSWER
Answered 2022-Feb-24 at 12:23The auto-expand issue was related to an issue with PHP Debug.
This issue was related to PHP Debug ~v1.24.1 or v1.24.2
. Thanks for @zobo for the quick assistance on resolving the issue, much appreciated!
Solution:
Install his new update: VS Code extension PHP Debug
v1.24.3
QUESTION
I've been using Xdebug debugging with PHP on Visual Studio Code. Worked basically okay. Then on the 22dn of January, I apparently got a new version. I didn't ask for it, but I seemed to have gotten it anyway. And the latest version does not work. Whenever I try to start a debugging session, I now get this error:
"Cannot activate the 'PHP Xdebug' extension because it depends on an unknown 'felixfbecker.php-debug' extension."
Ehh? What? Does anybody have an explanation?
...ANSWER
Answered 2022-Jan-27 at 19:54The PHP debug extension has moved to a new organisation: xdebug.php-debug
.
You might just have to uninstall the current one, and then install the one with the new name: https://marketplace.visualstudio.com/items?itemName=xdebug.php-debug
QUESTION
I am trying to debug a Twig template in my Drupal 9 site. I am using VSCode as my IDE and using Xdebug for debugging. I have setup/configured the installation based on the instructions outlined here - https://www.drupal.org/docs/develop/development-tools/configuring-visual-studio-code
I am able to set breakpoints in PHP files (step thru and watch variables successfully) however I just can't seem to do the same for Twig template files (just so I can see what variables I have access to in that template). What I mean by when I say I am unable to add the breakpoint is that clicking on the gutters of a Twig file within VSCode does not result in addition of any breakpoint.
I'd like to take advantage of Xdebug instead of using debugging functions like breakpoint()
and dump()
offered by the Devel and Twig_xdebug modules within Drupal. I am pretty sure I am doing something wrong or have missed a step but I can't seem to figure out what it is.
Some more details on my env:
- a local Drupal 9 setup on a Mac OS that uses PHP 7.4 and nginx as its webserver.
- Xdebug (v3.1.1) is installed and enabled (verified via
phpinfo()
output) - VSCode (1.63.0) installed with all of the supporting Drupal and PHP extensions outlined in the above article (specifically php-debug) have been installed.
- I am using the default launch configuration to Run my debug session in VSCode.
I'd appreciate any pointers on what I am doing wrong and/or what I can try. Also, I hope I provided enough info on my use case.
...ANSWER
Answered 2021-Dec-12 at 09:14Twig compiles the template files into PHP files. You need to set breakpoints in these Twig generated PHP files in order to debug them.
On this page, I also see that there is caching involved, which you will need to disable. That documentation seems to be quite comprehensive.
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
Goal
Debug with PHP Debug, Xdebug and VSCodium.
Problem
VSCode doesn't start debugging. When I click Start Debugging
the blue line under the debugging control buttons appears and moves for a few seconds and then the control buttons disappear. Same when I press the green "Run" button
Also on the left side, where "variables", "watch" and "stack" are shown nothing appears.
Description
I have no experience with the VSCodium debugging options. I used a couple of tutorials (1, 2, 3, videos and tried certainly the proposal from the VSCode PHP Debug extension site (which I use).
I'm using Codium (VSCode without MS) on a Linux Mint 20 machine. PHP 7.4 and Xdebug are installed via Linux Synaptic Package Manager. Of course the Xdebug helper in Firefox is enabled, breakpoints are set and I tried it in different projects. I tried a few things in the php.ini
. That's how it looks at the moment:
ANSWER
Answered 2020-Dec-22 at 09:32Finally found the solution. Its a Codium specific bug. At VSCode it works. Found the solution here: https://github.com/VSCodium/vscodium/issues/466
make sure you don't have PHP Debug extension installed;
go to https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug and download vsix file using "Resources" → "Download Extension";
in VSCodium go to "Extensions" sidebar and then click three dots icon near to "Extensions" title;
choose "Install from VSIX…" and select downloaded file.
@LazyOne thanks for your help again :)
Edit:
If you are updated to Xdebug 3.* you have to modify the xdebug section in the php.ini
:
Add this:
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
I've tried many things trying to let work Xdebug in a Docker container. I came in contact with these resources:
- Setting up Xdebug with Docker Compose and WordPress image
- Installing XDebug in Docker
- Starting The Debugger
- Zero-configuration Web Application Debugging with Xdebug and PhpStorm
- Xdebug & Zend Debugger bookmarklets generator for PhpStorm
- Configure Xdebug
- Troubleshooting common PHP debugging issues
- .. and other
I think the problem is either something with the ports that I don't understand, or it is something with the debugger session not being started or recognized. For the debugger session I have also tried to install a browser extension that sets a cookie.
I ended up at least to have separate containers, one as dev container with enabled Xdebug.
docker-compose.yml
...ANSWER
Answered 2020-Jun-20 at 17:50After booting up my machine to investigate further with the comments of @abestrad and @LazyOne, without changing anything, opening localhost:8080 suddenly let the debugging work by stoping at the breakpoint that i have set. Actually I had already tried to restart the Docker Desktop App before writing the question, maybe at that point my configurations were at a wrong state.
But at the end the solution was: Restarting the PC.
Watch out
To be sure i tried to open it also in a private browser session and it wasn't working anymore. That was because the special cookie still was set in the normal browser store (cookie that was stored either from the Browser extension that I have already uninstalled, or from trying out the JetBrains Bookmarklets generator before writing the question).
The solution to let it work everytime was to add following:
QUESTION
I have visual studio code 1.41.1 installed with PHP Debug Version - 1.13.0.
https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug
I am running PHP Lamp stack on Ubuntu, my PHP info is showing “xdebug xdebug support enabled - Version 2.9.0”
My PHP.ini is configured as follows:
...ANSWER
Answered 2020-Jan-08 at 14:01It looks like something else is already listening on port 9000, and hence, VS can't open the same port for listening as well. It is likely that this is PHP-FPM.
To work around this, set the following instead in php.ini:
QUESTION
I'm trying to get xdebug to talk to PHPStorm from inside a docker container.
My .ini file currently looks like this, but believe me: I've experimented with many combinations of these settings this morning:
...ANSWER
Answered 2020-Jan-29 at 10:52I hope it's help you:
docker-compose.yml
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install php-debug
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