Git Product home page Git Product logo

xdebug.org's Introduction

Xdebug

https://ci.appveyor.com/api/projects/status/glp9xfsmt1p25nkn?svg=true https://circleci.com/gh/xdebug/xdebug/tree/master.svg?style=svg

Xdebug is a debugging tool for PHP. It provides step-debugging and a whole range of development helpers, such as stack traces, a code profiler, features to dump the full execution of your script to a file, and more.

Repography logo / Recent activity Time period

Timeline graph Pull request status graph Trending topics Top contributors

Requirements

Xdebug requires a supported version of PHP. For installation it requires the pecl tool (available through the php-pear package), unless your Linux distribution has an Xdebug package (php-xdebug).

Installation

On most Linux distributions you can install Xdebug through its package manager. You can also compile from source with the pecl tool through pecl install xdebug. The latter also works for MacOS as long as PHP is installed with Homebrew.

On Windows, you need to download a binary. Use the Wizard.

Unless you have installed Xdebug with a package manager on Linux, you also need to add the following line to your php.ini file, or create a new Xdebug specific ini file xdebug.ini in the conf.d directory. In either case, it needs the following line added:

zend_extension=xdebug

For more extensive installation instructions, see the documentation at https://xdebug.org/docs/install

Configuration

Most features in Xdebug have to be opted in into. Each feature has a specific opt-in. For example to use the step debugger you need to set xdebug.remote_enable=1 in your configuration file. The step debugger requires an IDE (client), of which there are many available.

The documentation has instructions for each of Xdebug's features: https://xdebug.org/docs/ and a full list of settings is also available there.

Contributing

Xdebug is written in C, and extensive knowledge of PHP's internals is necessary to be able to contribute. Contributing guidance is available separately.

Before you begin to contribute, please reach out first. Either through email (address at the bottom), an issue in the issue tracker or preferably through IRC on Freenode's #xdebug channel.

Testing

If you are familiar with compiling PHP extension from source, have a local checkout of Xdebug's GitHub repository, and have compiled Xdebug in that directory following the instructions under installation you can run Xdebug's tests by running:

php run-xdebug-tests.php

The test framework requires that the PHP binary on the path has Xdebug loaded, with remote debugging enabled through xdebug.mode=debug. It is possible to skip remote debugging tests by exporting the SKIP_DBGP_TESTS=1 environment variable.

The SKIP_UNPARALLEL_TESTS=1 can be used to skip tests that can not run in parallel environments, and the SKIP_SLOW_TESTS=1 environment variable to skip slow tests. The OPCACHE environment variable can either be yes or no and controls whether the test framework enables or disables OpCache.

Licensing

Xdebug is released under The Xdebug License, which is based on The PHP License. It is an Open Source license (though not explicitly endorsed by the Open Source Initiative).

Further Reading

Xdebug has extensive documentation on its website. There are over a hundred settings and many functions documented. Please have a look through the wealth of information that Xdebug can provide to make your every day development with PHP easier.

Support

For questions regarding Xdebug, please use StackOverflow, and tag your question with xdebug.

You can also find ad-hoc and sporadic support on IRC: freenode/#xdebug. You can do that with your favourite client, or by using their webchat.

If you think that you encountered a bug, please file a detailed bug report at https://bugs.xdebug.org. You are required to create an account, this is so that you can be contacted for additional information and to keep out spam.

Derick Rethans — [email protected]

xdebug.org's People

Contributors

beberlei avatar cookieguru avatar danquah avatar derickr avatar fancyweb avatar imsop avatar jmrieger avatar maks3w avatar meteguerlek avatar mgdm avatar mmcev106 avatar moritz-t-w avatar muglug avatar nojimage avatar paul121 avatar pgrimaud avatar plloi avatar rdohms avatar robertbasic avatar robertlemke avatar sebastianbergmann avatar sebastianfeldmann avatar sgolemon avatar superbiche avatar tekkcraft avatar timmillwood avatar tomasfejfar avatar voda avatar wimg avatar ysaxon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xdebug.org's Issues

Wizard does not cope with VS19

The latest Windows builds of PHP 7.4 ( specifically PHP 7.4 (7.4.0beta2) ) are built using VisualStudio VS16 (PHP Extension Build => API20190529,NTS,VS16) which is not accepted by the wizard.

I can see where to fix this in phpinfo-scanner.php, but I've got no ways of testing it.

Remove Xcode from the installation instructions

I use MacOS and have not installed Xcode from the App Store, just the command line tools. Yet XDebug works just fine. I can't imagine how Xcode would actually be required for it to work... If it isn't, please correct the instructions which state the Mac prerequisites as

Xcode (from the App Store), and Xcode's command line tools

The full version of Xcode takes a huge amount of disk space. According to macpaw:

On the App Store page for Xcode, it lists the size of Xcode 12.5 as 11.7GB. However, when you try and install it, you'll get an error message unless you have at least 40GB of free space

I'm trying to translate the documentation to Chinese.

There are many Chinese developers who can only read Chinese. So I'm trying to translate the documentation to Chinese and maintaining a mirror site with Chinese version documentation. Did that abuse any terms or copyright. Is it allowed?
Thanks for any comments.

remote step debugging

Hi Dereck,

I would like to suggest to create a step by step tutorial on how to get remote step debugging working for first time users. I hit the wall for many hours on how to get it working today and more times in the past. If you're open to such a contribution, I'll happily provide it.

Broken link

In this page you can find between parenthesis this text at the end of the first paragraph of the "Configuring Step Debugging":

Skip to Activating the Debugger if that's the case.

The "Activating the Debugger" is a broken link.

contributing.php

Greeting , I was browsing the website, specially contributing web page, and figured out that in the third section of the web page :

Working on a new feature

the issue is with the naming as I guess,

Create a feature branch:
git checkout -b issue{issue number}

the question is : does that on purpose??

or it's just a typo and you need to update it to :

Create a feature branch:
git checkout -b feature{feature number}

and so on.

Regards.

RSS feed broken

Currently the RSS feed does not contain any items.

Seems like commit 5df9729 broke it because the path to the news items in rss.php did not get updated.

Xdebug 3.1.4 not working with PHP 7.4.28

OS: win 10
Before I used Xdebug v2 with PHP 7.3 and it worked well.
Nowadays I work on a project(it needs php 7.4+) and so I installed another xampp version and configured everything in the same way as before. (using dll wizard)

image

image

image

image

image

Thanks in advance.

(solved) Wizard doesn't show anything this time

Hello! I'm user of xdebug with the laravel projects and vscode.
I configured it a few times correctly with the wizard, but this time, with my new homestead vm, nothing was shown in the wizard page.
無題

But now I found out the how to solve it.
I opened php -i output file named 'php -i' with notepad(in win10) but it was the bad operation and the problem. I tried post opening the file with my vscode, and it worked.
無題

I'm not sure the problem but I can guess it because of difference of the character code... anyway I can now configure my new vm! I really like to say thank you very much to @derickr for helpfully asking me what's the problem!

Xdebug v3.0 causes JIT to be disabled

When you run PHP v8.0 with Xdebug v3.0 enabled, JIT is not working regardless that Opcache is on. It seems that Xdebug is overriding zend_execute_ex() function and this seems to be the cause of the issue. The error message is following:

<br />
<b>Warning</b>:  JIT is incompatible with third party extensions that override zend_execute_ex(). JIT disabled. in <b>Unknown</b> on line <b>0</b><br />
[15-Sep-2021 12:00:00] NOTICE: fpm is running, pid 1
[15-Sep-2021 12:00:00] NOTICE: ready to handle connections

When Xdebug if off, both Opcache and JIT work fine.

I have also created repository, where you can easily reproduce the issue. Just follow the readme.

Repository is here: https://github.com/lukasneubauer/docker-php-circular-jit-dependency-dropped.

Wrong anchor link on /docs/step_debug

I just noticed that there is a wrong anchor link here: https://xdebug.org/docs/step_debug

In the section Introduction it says

(An overview of third party clients is available further down this page.)

and provides a link to https://xdebug.org/docs/step_debug#client but it should be the anchor #clients and not #client

Wizard is misleading with its "not supported" message

I understand the distinction between "supported" and "unsupported" PHP versions, but the wizard at
https://xdebug.org/wizard.php is very confusing to people who want to find an xdebug version for "unsupported" PHP versions. We semi-regularly see questions like this on Stack Overflow: https://stackoverflow.com/q/52197962/476.

It would be more helpful to direct users with old PHP versions to the archives download page; or better, to tell them what old unsupported xdebug version fits their old unsupported PHP version.

Ability to click on section titles and get the url with the anchor value

Hi,

First of all, thank you for writing the documentation and the Xdebug.

I was reading the Xdebug documentation and I noted that it is not possible (at least with Google Chrome) to click on a section title and get the url with a suffix to that section. This is a good feature when we want to share a link to a specific topic.

Currently the website already uses anchors in some places but it is not allowed to select it unless you are poking around with "inspect element".

After reading the source code I noted that every section (not sure if is really all of them) has the following format

Page: https://xdebug.org/docs/upgrade_guide section Step Debugging

<a name="Step-Debugging"></a>
<h2>Step Debugging</h2>

image

If we change the format to

<a name="Step-Debugging" href="#Step-Debugging"><h2>Step Debugging</h2></a>

The styles of the tag a wll be applied to the h2 element but we will be able to click and get the url to that section: https://xdebug.org/docs/upgrade_guide#Step-Debugging

image

To remove the styles we can apply the following css

.section-anchor {
	color: black;
}
.section-anchor:hover {
	text-decoration: none;
}
.section-anchor:focus {
	outline: none;
}

and then add the css class .section-anchor

<a name="Step-Debugging" href="#Step-Debugging" class="section-anchor"><h2>Step Debugging</h2></a>

Currently there are 216 occurrences of the expression <a name=*.

/wizard gives incorrect instruction for installing on windows

After pasting my phpinfo(), I was prompted to add zend_extension = ext\php_xdebug-2.9.6-7.4-vc15-x86_64.dll to my php.ini.

This doesn't work; the correct line to use was zend_extension = php_xdebug-2.9.6-7.4-vc15-x86_64.dll.

My stock php.ini file appears to have extension_dir set to ext:

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
;extension_dir = "./"
; On windows:
extension_dir = "ext"

git clone on Windows systems

Hi Derick,
you may want to remove the asterix from the following file so that it checks out properly on Windows systems:

html/docs/include/settings/dump.*.html

When you git clone under windows, you get the following error:

error: unable to create file html/docs/include/settings/dump.*.html: Invalid argument

PHP syntax error in phpinfo-scanner.php file

I was using Tailored Installation Instructions section of your website under following URL

https://xdebug.org/wizard.php

But, when i submitted php -i output and clocked Analyse my phpinfo() output button, it produces no result (blank output) i.e. not working. On the same page i found a link toward this piece of code that you are using to analyze phpinfo() output. But, it again did not work because of a PHP syntax error in your source code on following URL:

https://github.com/xdebug/xdebug.org/blob/master/html/include/phpinfo-scanner.php

Line 14 = '7.3' => [ 'src' => '2.7.0' 'win' => '2.7.0' ]

Line 14 (Fixed) = '7.3' => [ 'src' => '2.7.0', 'win' => '2.7.0' ]

macOS Catalina build error

error: unknown warning option '-Wdiscarded-qualifiers'; did you mean '-Wignored-qualifiers'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wlogical-op'; did you mean '-Wlong-long'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wmaybe-uninitialized'; did you mean '-Wuninitialized'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Werror,-Wunknown-warning-option]
make: *** [xdebug.lo] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.