[PHP] 如何在NetBeans中使用xdebug来调试php
其实,文章的重点是放在了如何配置php的xdebug环境,毕竟环境搭好了,像NetBeans,Eclipse这样的IDE,随便哪个都可以做php的调试的。
操作环境:
OS: Ubuntu 10.04
Server: xampp 1.7.3a
1. 下载xdebug.so
方便懒人,不用去编译,所以就提供一个32位的xdebug.so。
http://download.csdn.net/source/2757538
下载好之后,把文件放到(注意这个跟你安装xamp的路径不同而不同,这个是通用的安装路径)
/opt/lampp/lib/extensions
2. 配置php.ini
打开 /opt/lampp/etc/php.ini,添加以下内容
代码
<p class="sycode"> zend_extension =/ opt / lampp / lib / php / extensions / xdebug.so[debug]; Remote settingsxdebug.remote_autostart = offxdebug.remote_enable = onxdebug.remote_handler = dbgpxdebug.remote_mode = reqxdebug.remote_host = 127.0 . 0.1 xdebug.remote_port = 9000 ; Generalxdebug.auto_trace = offxdebug.collect_includes = onxdebug.collect_params = offxdebug.collect_return = offxdebug.default_enable = onxdebug.extended_info = 1 xdebug.manual_url = http: // www.php.netxdebug.show_local_vars = 0 xdebug.show_mem_delta = 0 xdebug.max_nesting_level = 100 ;xdebug.idekey = ; Trace optionsxdebug.trace_format = 0 xdebug.trace_output_dir =/ tmpxdebug.trace_options = 0 xdebug.trace_output_name = crc32; Profilingxdebug.profiler_append = 0 xdebug.profiler_enable = 0 xdebug.profiler_enable_trigger = 0 </p>
3. 记得重启服务器!
<p class="sycode"> sudo / opt / lampp / lampp restart </p>
4. 用 NetBeans 打开一个项目,添加断点,调试!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Alipay PHP...

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...

Article discusses essential security features in frameworks to protect against vulnerabilities, including input validation, authentication, and regular updates.

The article discusses adding custom functionality to frameworks, focusing on understanding architecture, identifying extension points, and best practices for integration and debugging.
