Welcome Guest, Not a member yet? Register   Sign In
How to debug CI source code with NetBeans. ? thanks!

[eluser]Nano HE[/eluser]

Good day.

My NetBeans enviroment based windowns system.
The tool worked very well for normal PHP source code.

i want to debug CI code with my NetBeans.

I set my system project properties -> run configuration -> Project URL: http://localhost/data/index.php/welcome/
And i linked the CI system folder as the NetBeans Project root directory.
When i strike F6 (Run). It worked well.

Then i set breakpoint at the welcome controller source code file welcome.php.
BreakPoint located here :

When i strike Ctrl + F5 (Debug Project)
It failed to Go to the welcome.php file and also it didnot stop at the breakpoint.

IE url link to
Show the following information.
404 Page Not Found
The page you requested was not found.

i am appreciated any help.


[eluser]Bogdan Tanase[/eluser]
try enabling query strings in config.php file from CI, it might get you a little further.


BTW, the only decent debugging I've seen for PHP is the one from Zend Studio. It has a browser plugin which communicates with Zend Studio so you can break the script exactly where you got the problem.

It works very simple:
1. set break point in the suspected code
2. run the application and go to the page you wish to debug (let's say a form or something).
3. right click browser window, select "debug next page"
4. Submit the form. And that's all. The debugger will start.

It also doesn't uses query strings so it works really nice with CI.

I'm interested if anyone found a similar free solution to do useful debugging in PHP.

[eluser]Francis Robert[/eluser]
I have found the following but haven't tried it yet:

$config['uri_protocol'] = "PATH_INFO";
$config['enable_query_strings'] = TRUE;

[eluser]Nano HE[/eluser]

Guys thank you!

feedback my test result.

Test result : pass!

the following snippets from config.php

// $config['uri_protocol']    = "AUTO";
$config['uri_protocol']    = "PATH_INFO";        // Work very well for NetBeans Debug Test
// $config['uri_protocol']    = "QUERY_STRING";    // Can't Work for NetBeans Debug Test
// $config['uri_protocol']    = "REQUEST_URI";    // Can't Work for NetBeans Debug Test

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';    // Work very well for NetBeans Debug Test
// $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-?';  // that means the character of ? is optional

Thanks a lot!

[eluser]Gregory Kornblum[/eluser]
[quote author="Bogdan Tanase" date="1248089246"]
I'm interested if anyone found a similar free solution to do useful debugging in PHP.[/quote]

You can download just the debugger & toolbar from Zend.com (free registration required). Although for the debugger I suggest using Zend Server Community Edition (Windows, Mac or Linux) as it comes with it and everything is highly optimized. I actually use for my production system as well since the compile is more optimized then the one you'd get using apt-get.

ok - i have netbeans 6.8 + php5 + codeignitor all working.

I’ve discovered one thing: I had to leave “index.php” in my URL and remove my .htaccess rewrite script to get it to work.

I’m posting this here in case people search for a solution like i did smile

Theme © iAndrew 2016 - Forum software by © MyBB