Home Development Tools atom An article to help you learn breakpoint debugging

An article to help you learn breakpoint debugging

Jul 01, 2020 am 10:20 AM
atom xdebug Breakpoint debugging

It is inevitable that you will encounter unknown errors during the development process. Please specify not to debug bit by bit! This article will show you how to use atom to debug the program. If you have any If you have any questions, just reply in the comment area.

1. Install php-debug in atom

Click file->settingsAn article to help you learn breakpoint debugging Then click install and search for php-debug. If the search here cannot come up, you need to find a way! We must learn to surf the Internet scientifically! An article to help you learn breakpoint debuggingSuccessful installation is like thisAn article to help you learn breakpoint debugging

2. Download Xdebug

Download address: https://xdebug.org/download, After opening the address, you can see the extension. The one installed here is php7.3An article to help you learn breakpoint debugging, but there are two php7.3s, which one should you choose? Open your PHP environment and you can see vc15An article to help you learn breakpoint debugging in the box, then put the downloaded file into D:\phpstudy_pro\Extensions\php\php7.3.4nts\ext, here is the address of Kaka . Just put it in your own PHP environment. An article to help you learn breakpoint debugging

3. Configuration

Then find your php.ini file and copy the following configuration Go in. Remember to modify the location of zend_extension.

This location is related to your PHP location. An article to help you learn breakpoint debugging

<span style="display: block; background: url(https://imgkr.cn-bj.ufileos.com/97e4eed2-a992-4976-acf0-ccb6fb34d308.png); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; color: #abb2bf; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; letter-spacing: 0px; padding-top: 15px; background: #282c34; border-radius: 5px;">[Xdebug]<br/>zend_extension = D:\phpstudy_pro\Extensions\php\php7<span class="hljs-number" style="color: #d19a66; line-height: 26px;">.3</span><span class="hljs-number" style="color: #d19a66; line-height: 26px;">.4</span>nts\ext\php_xdebug<span class="hljs-number" style="color: #d19a66; line-height: 26px;">-2.9</span><span class="hljs-number" style="color: #d19a66; line-height: 26px;">.6</span><span class="hljs-number" style="color: #d19a66; line-height: 26px;">-7.3</span>-vc15-nts-x86_64.dll<br/>xdebug.remote_enable = On<br/>xdebug.remote_host = localhost<br/>xdebug.remote_port = <span class="hljs-number" style="color: #d19a66; line-height: 26px;">9000</span><br/>xdebug.remote_handler = dbgp<br/>xdebug.idekey=xdebug-atom<br/></code>
Copy after login

How to determine this location! If you are using the new version of phpstudy, D:\phpstudy_pro\Extensions\php\php7.3.4nts\extThat is this locationAn article to help you learn breakpoint debuggingIf you are using the old version of phpstudy The location is C:\phpStudy\PHPTutorial\php\php-7.1.13-nts\extAn article to help you learn breakpoint debugging

##4. Test

After completing the above work, remember to restart the environment.

Two things need to be done at this time.

First open atom debug

An article to help you learn breakpoint debugging

Second enter the address in the address bar

http://localhost/index.php?XDEBUG_SESSION_START=1Note here the following parameters.

A pop-up box will appear. Just fill in the address as your project path.

The debugging panel will come out at this time, and you can see that our variable values ​​have been printed. An article to help you learn breakpoint debuggingUp to this point our breakpoint debugging is complete. An article to help you learn breakpoint debugging

5. Summary

Summary of important steps for configuring breakpoints.

  • atom download php-debug
  • Download xdebug and put it in the corresponding PHP extension
  • You need to carry it when accessing the address bar?
  • #

The above is the detailed content of An article to help you learn breakpoint debugging. For more information, please follow other related articles on the PHP Chinese website!

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 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)

Recommended sharing of 40+ commonly used plug-ins in atom (with plug-in installation methods) Recommended sharing of 40+ commonly used plug-ins in atom (with plug-in installation methods) Dec 20, 2021 pm 04:14 PM

This article will share with you 40+ commonly used plug-ins for atom, as well as methods for installing plug-ins in atom. I hope it will be helpful to you!

Intel launches Amston Lake series of Atom processors for edge and networking markets Intel launches Amston Lake series of Atom processors for edge and networking markets Apr 09, 2024 pm 09:22 PM

According to news from this site on April 9, Intel today released the Amston Lake series of Atom processors at Embedded World 2024. The Amston Lake processor is based on the Intel7 process and supports single-channel memory. It can be regarded as a branch variant of the Alder Lake-N processor, including the edge-oriented Atom x7000RE series and the network-oriented x7000C series. This site reported on the ADL-N architecture Atom x7000E processor with up to four cores in 2023, and today’s x7000RE series has further expanded the specifications: it can choose up to 8-core Atom x7835RE, both this processor and the four-core x7433RE Equipped with 32E

Will enabling XDebug on a production server make PHP slower? Will enabling XDebug on a production server make PHP slower? Sep 22, 2023 pm 10:41 PM

Yes, debuggers like XDebug can slow down PHP server performance. This is why the debugger is not placed in a server environment. They are deployed in different environments to avoid unnecessary overhead. Debug messages cannot be displayed in applications that are already in production. When debugging behavior is added to the server, the debugging engine is attached to the PHP process. It starts receiving messages to stop at the breakpoint, but this is not required behavior as it would give a performance hit to other processes, thus stopping the PHP parser. On the other hand, when debuggers are installed, they tend to open ports in the server because they are not intended for use in a production environment. Opening a port in your server is just as bad as opening a door for hackers to snoop through.

Atom functions for PHP functions Atom functions for PHP functions May 19, 2023 am 09:10 AM

Atom function of PHP function Atom function is a commonly used function in PHP language, which can obtain the atomic value of a variable. In PHP, variables are a very important concept and a very widely used element. It is worth noting that in addition to representing basic types such as numbers and strings, PHP variables can also represent composite types, such as arrays and objects. Therefore, when performing variable operations, you need to use the Atom function to obtain the atomic value of the variable. The following is an introduction to the specific use of Atom functions.

What coin is ATOM? What coin is ATOM? Feb 22, 2024 am 09:30 AM

What coin is ATOM? ATOM is the native token of the Cosmos network, a decentralized blockchain platform designed to facilitate connectivity and interoperability between different blockchains. The mission of the Cosmos project is to build a network called "Interconnected Blockchain", and the ATOM token plays a vital role in this network. ATOM tokens were originally issued through an ICO (Initial Coin Offering) in 2017. As a token based on the Tendermint consensus algorithm on the Cosmos blockchain, ATOM tokens are used in the Cosmos network as rewards to incentivize node participants and maintain network security. Cosmos Network The Cosmos Network is a network of independent blockchains that are connected to each other.

Atom basic plug-in recommendation: realize synchronization and special effects typing Atom basic plug-in recommendation: realize synchronization and special effects typing Sep 22, 2022 pm 02:16 PM

How to perform synchronization settings and special effect typing in Atom? In this article, I will recommend several practical plug-ins to you and see what effect they have. I hope it will be helpful to you!

How to set breakpoint debugging in php How to set breakpoint debugging in php Mar 28, 2023 pm 04:18 PM

PHP is a commonly used server-side programming language. With the rapid development of Internet technology, PHP is used more and more widely. However, when we develop PHP, we will inevitably encounter various problems and errors. At this time, how to debug will become one of the problems we need to solve. This article will introduce how to set breakpoints to debug PHP code to help you quickly locate and solve problems.

Debugging library in PHP8.0: Xdebug Debugging library in PHP8.0: Xdebug May 14, 2023 am 08:09 AM

Debugging is an inevitable part of PHP development. In order to help developers debug their own code more easily, PHP8.0 introduced a very useful tool in its debugging library: Xdebug. This article will introduce some of the main features of Xdebug and how to use it to simplify the process of PHP debugging. Xdebug is an open source debugging tool that can capture errors in PHP applications and provide detailed error stack trace information, as well as the variables being used. It helps developers detect and troubleshoot code

See all articles