douhuang9886 2015-08-03 02:59
浏览 249
已采纳

Netbeans 8.0.2调试器断点不起作用

I just installed Netbeans for PHP (version 8.0.2). XDebug seemed to come with this installation. I'm trying to get the breakpoints and stepping through the code to work on my local machine, which is running WAMP, to work.

I've never used debugging for PHP; only with Excel VBA, so I'm familiar with how breakpoints and stepping through code works. It seems that this feature comes with Netbeans/XDebug.

But when I click on the debug button on the top middle of the screen, a bunch of buttons pop up. A good portion of them are greyed out and I am not able to use them. Specifically, the continue, step over, step into, step out, and run to cursor. The stop button is there, but works fine. When I click on debug, a new browser window opens and my code displays in the browser. It seems to ignore the breakpoint that I have placed in my code, though.

I have breakpoints in my code, just to see how it all works in a PHP IDE, but I can't seem to get the breakpoints to work. My code is really nothing fancy; all I have is what is below:

<?php
echo "Hello world!<br />";
echo "Google Chromium.";

I have a breakpoint on line 2 where it says "Hello world!" (I clicked on the left side of the code and a red box displayed next to the line of code).

I am not really sure where to start with fixing this. XDebug shows up in my phpinfo() as version 2.2.5. I've seen some questions address changing some of the parameters in php.ini, but each seems very specific to the person who posts problem. I've checked the port to make sure it's 9000, I've also placed/changed the following code in my php.ini file:

[xdebug]
xdebug.remote_enable = on
xdebug.profiler_enable = on
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug.show_local_vars=0

xdebug.remote_handler=dbgp 
xdebug.remote_host=localhost 
xdebug.remote_port=9000

How do I get breakpoints to work and stepping through code to work with Netbeans and XDebug?

  • 写回答

1条回答 默认 最新

  • doushao5047 2015-08-18 14:28
    关注

    Check php.ini. Parameter xdebug.extended_info mast be equal to 1.

    xdebug.extended_info = 1
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥15 绘制多分类任务的roc曲线时只画出了一类的roc,其它的auc显示为nan
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
  • ¥20 腾讯企业邮箱邮件可以恢复么
  • ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
  • ¥15 错误 LNK2001 无法解析的外部符号
  • ¥50 安装pyaudiokits失败
  • ¥15 计组这些题应该咋做呀
  • ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?