I have the Xdebug set up. And it works. I can debug code. However I got one issue to debug external php code, it did hit the break points I set.
Here's more detail.
the external code is called from the action for a form.
<form name="htmlform" method="post" action="contact_form_send.php">
I have some code in the contact_form_send.php such as following
<?php
if(isset($_POST['email'])) {
$email_to = "[email protected]";
$email_subject = "test";
I set breakpoint at the first line. It never hit it. However If I embedded the code in the same file as the form. I can set breakpoints, step through the code. I know the xdebug is working because I saw the status bar says it
I'm new to netbeans and php. How can I debug the external php code?
Thanks for your help.
Here's my Xdebug config.
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "C:\xampp\tmp"
xdebug.remote_port = 9080
Update: Just made it work. The index file I was debug was a htm file instead of a php. It called the external php file in the action. XDebug can not connect to server because of this, stuck at "waiting for connection". I changed the extension of the index file to be php. Now everything works. However I don't know if this make sense. The php code did get called from htm file, and run. Why do I have to change the extension of the index file to be php to debug the external code? Did I miss something in the configuration?
Thanks.