Table of Contents
PHP XDebug Sublime Text single-step debugging, xdebugsublime
Home Backend Development PHP Tutorial PHP XDebug Sublime Text single-step debugging, xdebugsublime_PHP tutorial

PHP XDebug Sublime Text single-step debugging, xdebugsublime_PHP tutorial

Jul 12, 2016 am 09:06 AM
php sublime text xdebug debug

PHP XDebug Sublime Text single-step debugging, xdebugsublime

Pre-environment: LNMP has been installed

1. Install xdebug

Can be installed through pear package management

sudo apt-get install php-pear

sudo pecl install xdebug

Here we install directly through apt

apt-get install php5-xdebug

The program has automatically created a default configuration file

Configuration:

xdebug.ini location:/etc/php5/mods-available/xdebug.ini

Newly added as follows

zend_extension="/usr/lib/php5/20131226/xdebug.so"

xdebug.profiler_output_dir=/tmp

xdebug.profiler_output_name=cachegrind.out.%p

xdebug.profiler_enable_trigger=1

xdebug.profiler_enable=true

xdebug.remote_enable=true

xdebug.remote_host=127.0.0.1

xdebug.remote_port=9000

xdebug.remote_handler=dbgp

xdebug.remote_mode = req

xdebug.remote_connect_back = 1

xdebug.remote_autostart=0

xdebug.collect_vars = On

xdebug.collect_params = On

xdebug.auto_trace = On

xdebug.show_exception_trace = On

xdebug.trace_output_dir=/tmp

Restart PHP5-FPM

/etc/init.d/php5-fpm restart

2. Enable debugging


CRL ALT F9 in sublime to open the debugging interface

View port 9000

3. Test

Create file test.php

for ($i=0; $i < 10; $i ) {

echo $i;

}

?>

Visit http://127.0.0.1/test.php

in the browser

You can see where our breakpoint is $i = 0

Shift f8: Open the debug panel
f8: Open the debug panel quick connection
Ctrl f8: Switch breakpoints
Ctrl Shift f5: Run to the next breakpoint
Ctrl Shift f6: Single step
Ctrl Shift f7: Step in
Ctrl Shift f8: Step out

CTRL SHIFT F7

Article address: http://www.cnblogs.com/martin-tan/p/4921200.html

PHP X-Debug files

KCachegrind can be opened directly under UBUNTU to facilitate the trace file loading sequence

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1065786.htmlTechArticlePHP XDebug Sublime Text single-step debugging, xdebugsublime pre-environment: LNMP has been installed 1. Install xdebug through pear Package management to install sudo apt-get install php-pear sudo pecl i...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1670
14
PHP Tutorial
1274
29
C# Tutorial
1256
24
PHP and Python: Different Paradigms Explained PHP and Python: Different Paradigms Explained Apr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

Choosing Between PHP and Python: A Guide Choosing Between PHP and Python: A Guide Apr 18, 2025 am 12:24 AM

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

How to run sublime code python How to run sublime code python Apr 16, 2025 am 08:48 AM

To run Python code in Sublime Text, you need to install the Python plug-in first, then create a .py file and write the code, and finally press Ctrl B to run the code, and the output will be displayed in the console.

PHP and Python: A Deep Dive into Their History PHP and Python: A Deep Dive into Their History Apr 18, 2025 am 12:25 AM

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHP's Impact: Web Development and Beyond PHP's Impact: Web Development and Beyond Apr 18, 2025 am 12:10 AM

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

PHP vs. Python: Use Cases and Applications PHP vs. Python: Use Cases and Applications Apr 17, 2025 am 12:23 AM

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

The Continued Use of PHP: Reasons for Its Endurance The Continued Use of PHP: Reasons for Its Endurance Apr 19, 2025 am 12:23 AM

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

How to automatically type notepad How to automatically type notepad Apr 16, 2025 pm 08:06 PM

Notepad itself does not have automatic layout function. We can use a third-party text editor, such as Sublime Text, to perform the following steps to achieve automatic typography: 1. Install and open the text editor. 2. Open the file that needs to be automatically typed. 3. Find and select the automatic layout function. 4. The editor will automatically type the text. 5. You can customize the layout rules as needed. Automatic typography can save time and ensure text consistency and professionalism.

See all articles