douluo1330 2015-06-22 13:58
浏览 85

NetBeans + XDebug断点无法正常工作

I know there are countless of questions regarding this subject, however no matter what I've tried I've had no luck whatsoever. The problem I'm encountering is regarding breakpoints when using NetBeans and XDebug (on Windows 8.1 if that affects anything).

The issue is that no breakpoints are working. By default when debugging with NetBeans, it stops on the first line and this does successfully happen. Therefore NetBeans is somehow connecting to XDebug. However, any other breakpoints in any other files are not working.

I've tried various different settings in the php.ini file but no luck so far. I've also tried switching on the XDebug log file so that maybe I can analyse what's going on, but this also didn't work. Finally I've tried setting breakpoints using xdebug_break() which also didn't work.

XDebug settings in php.ini

;[XDebug]
; Only Zend OR (!) XDebug
zend_extension="C:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="C:\xampp\tmp"

Project Run Configuration on NetBeans

Project Run Configuration

Advanced Configuration

I've already looked at the following:

Also note that this was working 3 days ago, however today no breakpoints are working.

Additional Info

I've run the following command in cmd php -v and the following warning was shown:

Warning: Module 'xdebug' already loaded in Unknown on line 0

Does this mean that xdebug is trying to be loaded twice? If so I'm not sure how this can be solved

  • 写回答

1条回答 默认 最新

  • dpkt31779 2015-06-23 17:28
    关注

    Figured out what the problem was. I know that this answer will be very specific, however it might help someone in the future.

    So while inspecting the code I noticed that someone added code that cleared all cookies when the login page loaded. Once the cookies are removed XDebug didn't work. The reason is that for XDebug to work it sets a cookie with the session id for example 'netbeans-xdebug' which is sent with every request on the website.

    It's a very simple issue but it took nearly 2 days to find out what was going on. Once again I know that this is a very specific case but maybe it might help someone out there.

    Happy coding!

    评论

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序