Home  >  Article  >  Backend Development  >  Using xdebug for debugging in phpstorm cannot enter breakpoints

Using xdebug for debugging in phpstorm cannot enter breakpoints

WBOY
WBOYOriginal
2016-12-01 00:25:332913browse

After successfully installing and configuring xdebug, I set a breakpoint but did not enter the breakpoint during debugging. What is going on?
Using xdebug for debugging in phpstorm cannot enter breakpoints

I configured the starting address here and set the corresponding breakpoint in the program
Using xdebug for debugging in phpstorm cannot enter breakpoints

But when the program executes to the breakpoint position, it does not stop entering the breakpoint. What is going on?

Reply content:

After successfully installing and configuring xdebug, I set a breakpoint but did not enter the breakpoint during debugging. What is going on?
Using xdebug for debugging in phpstorm cannot enter breakpoints

I configured the starting address here and set the corresponding breakpoint in the program
Using xdebug for debugging in phpstorm cannot enter breakpoints

But when the program executes to the breakpoint position, it does not stop entering the breakpoint. What is going on?

Here is a simple configuration method:

php configuration

  • Add configuration in php.ini: [Only key configurations are listed here]

<code class="ini">#开启远程调试
xdebug.remote_enable = 1  
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
#这个端口不占用phpfpm 的9000,换用另一个,一定要和上面phpstrom配置中的端口一致
xdebug.remote_port=9001
#开启自动开始调试
xdebug.remote_autostart=1
zend_extension=xdebug.so</code>

phpstrom configuration

File --> Settings --> Languages ​​& Frameworks -> PHP --> Debug
xdebug block
The debug port value is the same as the first port 9001

Turn debugging on and off

  • Option in phpstrom: Run --> (Run/Stop) Listening for PHP debug Connections [The icon is a green phone microphone with a little bug in the lower right corner, and there is also a quick access icon by default near the minimize button in the upper corner], This is the button to turn on and off debugging

Statement:
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