Hot File

Troubleshooting Guide PHP with Xdebug

View: 351    Dowload: 0   Comment: 0   Post by: hanhga  
Author: none   Category: Php&mySql   Fields: Other

9 point/3 review File has been tested

Make sure you create the folder c:\tmp\xdebug\ or replace it with your folder. Then restart your web server. With these steps Xdebug is configured for profiling application and remote debugging.

Introduction

Installing Xdebug :

The Xdebug is freely available from http://xdebug.org/.

If you use Windows, you can download the precompiled module for your PHP version. Installation is easy. Just place the DLL file to a directory (e.g. c:phpext) and add the following line to the php.ini file:

zend_extension_ts="c:phpextphp_xdebug-4.4.1-2.0.5.dll"

Don’t forget to change the path and filename to the correct one. Note that from PHP 5.3 onwards, you need to use zend_extension instead of zend_extension_ts.

Restart your web server. Create a php file that calls phpinfo() or use php -m if you have a command line version of PHP. Information about Xdebug module should appear twice (once under PHP Modules and once under Zend Modules).

Note that Xdebug does not work together with Zend Optimizer or any other Zend extension (DBG, APD etc). Perhaps you'll have to comment the line of Zend Optimizer.

;zend_extension_manager.optimizer_ts = "C:phpzendOptimizerlibOptimizer"

Now Xdebug is installed and configured. You may start using it right away or go on reading the article and learn how to debug PHP scripts in the Notepad++.

Using Xdebug and Notepad++ with DBGp plugin

To debug your scripts in the Notepad++, you need to perform next steps.

Install Xdebug as described above.

Add the following lines to the php.ini file just below the line zend_extension_ts="c:phpextphp_xdebug-4.4.1-2.0.5.dll"

xdebug.remote_enable=1 
xdebug.remote_handler=dbgp 
xdebug.remote_host=127.0.0.1 
xdebug.remote_port=9000 
xdebug.remote_mode=req 
xdebug.idekey=default 
xdebug.remote_log="c:	mpxdebugxdebug.log" 
xdebug.show_exception_trace=0 
xdebug.show_local_vars=9 
xdebug.show_mem_delta=0 
xdebug.trace_format=0 
xdebug.profiler_enable  = 1 
xdebug.profiler_output_dir ="c:	mpxdebug"

Make sure you create the folder c: mpxdebug or replace it with your folder. Then restart your web server. With these steps Xdebug is configured for profiling application and remote debugging.

Download and install the Notepad++ (V4.3 or higher).

Download the latest release of DBGp plugin. Unzip the file and move dbgpPlugin.dll to the plugins folder of your Notepad++ installation folder (e.g. C:Program FilesNotepad++plugins). Be sure to read theReadme.txt that is bundled with plugin for the latest information.

Now open the Notepad++. You should see the DBGp option in the plugins menu.

If you receive the error message that DBGp plugin is not compatible with current version of the Notepad++, install the earlier Notepad++ version (V4.4 works fine).

Click the Config… item and configure the DBGp debugger as shown. The Remote Path and Local Path is the folder where your php files reside.

Click Ok and you are done!

To start debugging open a php file in the Notepad++ and add a breakpoint to the script. In a browser add ?XDEBUG_SESSION_START=session_name to the end of the url. session_name could be anything you want (e.g. http://localhost/test.php?XDEBUG_SESSION_START=test). You should see the Notepad++ icon blinking on the taskbar. Click on it and start debugging

There is the Mozilla Firefox extension Xdebug Helperthat allows you to start/stop debugging and profiling without having to use XDEBUG_SESSION_START as parameter.

Troubleshooting Guide PHP with Xdebug

Troubleshooting Guide PHP with Xdebug Posted on 18-12-2015  Make sure you create the folder c:\tmp\xdebug\ or replace it with your folder. Then restart your web server. With these steps Xdebug is configured for profiling application and remote debugging. 3/10 351

Comment:

To comment you must be logged in members.

Files with category

  • How to Picking the Brains of Your Customers with Microsoft’s Text Analytics

    View: 2948    Download: 0   Comment: 0   Author: none  

    How to Picking the Brains of Your Customers with Microsoft’s Text Analytics

    Category: Php&mySql
    Fields: Other

    5/1 review
    With the explosion of machine learning services in recent years, it has become easier than ever for developers to create “smart apps”. In this article, I’ll introduce you to Microsoft’s offering for providing machine-learning capabilities to apps.

  • How to MySqli Tutorial PHP MySqli Extension

    View: 246    Download: 0   Comment: 0   Author: none  

    How to MySqli Tutorial PHP MySqli Extension

    Category: Php&mySql
    Fields: Other

    0/0 review
    PHP provides three api to connect mysql Database.

  • Make Laravel Artisan Commands

    View: 222    Download: 0   Comment: 0   Author: none  

    Make Laravel Artisan Commands

    Category: Php&mySql
    Fields: Other

    0/0 review
    Artisan is the command line tool used in Laravel framework. It offers a bunch of useful command that can help you develop application quickly. Apart from Artisan available commands, you can create your own custom commands to improve your workflow.

  • Check if a Number is a Power of 2

    View: 202    Download: 0   Comment: 0   Author: none  

    Check if a Number is a Power of 2

    Category: Php&mySql
    Fields: Other

    2.25/2 review
    How to check if a number is a power of 2. To understand this question, let’s take some example.

  • Concatenate columns in MySql

    View: 261    Download: 0   Comment: 0   Author: none  

    Concatenate columns in MySql

    Category: Php&mySql
    Fields: Other

    0/1 review
    Artisan is the command line tool used in Laravel framework. It offers a bunch of useful command that can help you develop application quickly. Apart from Artisan available commands, you can create your own custom commands to improve your workflow

  • How to Query NULL Value in MySql

    View: 193    Download: 0   Comment: 0   Author: none  

    How to Query NULL Value in MySql

    Category: Php&mySql
    Fields: Other

    5/1 review
    Misunderstanding NULL is common mistake beginners do while writing MySql query. While quering in MySql they compare column name with NULL. In MySql NULL is nothing or in simple word it isUnknown Value so if you use comparison operator for NULL values...

  • How to Abstract Class in PHP

    View: 226    Download: 0   Comment: 0   Author: none  

    How to Abstract Class in PHP

    Category: Php&mySql
    Fields: Other

    0/0 review
    What is an abstract class in PHP and when to use an abstract class in your application. In this tutorial, we’ll learn about abstract class and their implementation.

  • Use Enums in Rails for Mapped Values

    View: 221    Download: 0   Comment: 0   Author: none  

    Use Enums in Rails for Mapped Values

    Category: Php&mySql
    Fields: Other

    5/1 review
    When I worked in a call center, we used to mark cases with different statuses. This allowed upper management to get a handle on where cases stood, what the bottlenecks were and flow of calls. Thankfully it has been a long time since I worked in a...

 
Newsletter Email

File suggestion for you

File top downloads

logo codetitle
Codetitle.com - library source code to share, download the file to the community
Copyright © 2015. All rights reserved. codetitle.com Develope by Vinagon .Ltd