[英]Netbeans, xdebug : start debugging from browser
I have following problem about debugging PHP files
in Netbeans
using xdebug
: when I debug directly PHP file
everything works OK. 我有关于使用
xdebug
在Netbeans
调试PHP files
问题:当我直接调试PHP file
一切正常。
BUT: 但:
If I debug whole file (starts in index.html
) and after I click submit button which execute my PHP file
, where is the breakpoint, It doesn't work. 如果我调试整个文件(在
index.html
启动),然后在我单击执行我的PHP file
提交按钮后,断点在哪里,它不起作用。 I wanna put breakpoint to PHP file
to see what info I've received from my form in HTML
page. 我想把断点放到
PHP file
以查看我在HTML
页面中从表单中收到的信息。
I want to stop program just after those 2 variables, sent through ajax: 我想在通过ajax发送的那两个变量之后停止程序:
$username = $_REQUEST["username"];
$password = $_REQUEST["password"];
Is it even possible?. 它甚至可能吗? Thank you!
谢谢!
For the Netbeans settings look at my answer it's for linux but may help you. 对于Netbeans设置,请查看我的答案,它可以帮助您。
In your index.html replace your action=
with 在index.html中替换你的
action=
with
<form action="yourphpfile.php?XDEBUG_SESSION_START=netbeans-xdebug" method="post" name="FormName">
It's not necessary to modify your form code to enable debugging, as suggested by another answer here. 如此处另一个答案所建议的,不必修改表单代码即可启用调试。
This answer was partially sourced from Launch XDebug in Netbeans on an external request . 此答案部分来自NetBeans中的Launch XDebug,是在外部请求下获得的 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.