简体   繁体   English

使用xDebug在Netbeans中进行调试

[英]Debugging In Netbeans With xDebug

Am learning debugging using Netbeans (PHP) with xDebug. 我正在学习使用NetBeans(PHP)和xDebug进行调试。 I have set Breakpoint(s) in a php file am using but it seems anytime i start the debugging (clicking the start debug button) the system switches to the "index.php" file in the parent folder. 我在正在使用的php文件中设置了Breakpoint(s),但似乎每当我开始调试(单击“开始”调试按钮)时,系统就会切换到父文件夹中的“ index.php”文件。 The file am using is in a child folder of the folder containing the "index.php" file. 正在使用的文件位于包含“ index.php”文件的文件夹的子文件夹中。 How come the debugging goes to the "index.php" file? 调试如何进行到“ index.php”文件?

What am i doing wrong? 我究竟做错了什么? Am very new in using IDE debugging so help me out. 使用IDE调试非常新,请帮助我。 I always use print statements to debug my code but i have decided to use professional debugging. 我总是使用打印语句来调试我的代码,但我决定使用专业调试。 Am just new in this area so help me know what is going on. 我只是这个领域的新手,所以请帮助我知道发生了什么。

thanks. 谢谢。

Two things to look at: 要看的两件事:

  1. Tools->Options, PHP Section->Debugging Tab - Uncheck 'Stop at First Line' 工具->选项,PHP部分->调试标签-取消选中“在第一行停止”

  2. File->Project Properties - Run Configuration - Advanced - You can set the entry URL for the debugger. 文件->项目属性-运行配置-高级-您可以设置调试器的条目URL。 The default is to begin with the index page, but you can set it to ask for a url when the debugger is invoked. 默认设置是从索引页开始,但是您可以将其设置为在调用调试器时要求输入URL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM