How to install Xdebug in Laragon

Installation in Laragon:

  1. Create a file on your server and output phpinfo()
  2. Go to this URL: https://xdebug.org/download
    • then download xdebug depending on your PHP version.
    • select the one with “TS”, example: “PHP 5.6 VC11 TS (64 bit)”
  3. Enable xdebug by right click on the icon of laragon in your task bar.
    • then select PHP > Extensions > click xdebug-2.5.5#### to enable it.
  4. Access in your browser the file you created in step 1, make sure that it shows xdebug installed.
  5. Open php.ini of laragon then at the bottom of the file, add:
    • [XDebug]
      xdebug.profiler_enable = 1
      xdebug.profiler_output_dir = "C:\laragon\www\xdebug"
      • IMPORTANT: make sure that this directory exists. This is where all data will be logged.
      • for additional functions, see this link: https://xdebug.org/docs/profiler
      • make sure to restart laragon for changes to take effect.

Basically Xdebug creates a file which contains all the information that it profiled on your web page. You can use a tool called QCacheGrind to display the results in a much easier to understand graphical interface.



Do you need help with a project? or have a new project in mind that you need help with?

Contact Me