Welcome Guest, Not a member yet? Register   Sign In
Problems with debugging in PHPed
#1

[eluser]Unknown[/eluser]
Hi All,

debugging in PHPed works fine. So does CI. But together not.

PHPED uses a querystring that looks like this

http://localhost:8080/file:/D:/testsite/...=1,p=0,c=1

i get an 404 all the time. The cool thing is that i can now debug what happens - so i am 50% happy.

CI wants to launch a controller named DBGSESSID. i experimented with config settings enable_query_strings (FALSE and TRUE) and with permitted_uri_chars (adding ',' and making it empty). i dont' get an error that i use non permitted chars in my URL

can't i just tell CI to ignore the DBGSESSID?

any ideas?
#2

[eluser]Unknown[/eluser]
this is my workaround:

i left my protocol AUTO

in Router.php -> function _get_uri_string()

i changed code

if (is_array($_GET) AND count($_GET) == 1)
// Note: Due to a bug in current() that affects some versions
// of PHP we can not pass function call directly into it
$keys = array_keys($_GET);
return current($keys);
}

IN

if (is_array($_GET) AND count($_GET) == 1)
// Note: Due to a bug in current() that affects some versions
// of PHP we can not pass function call directly into it
$keys = array_keys($_GET);
if ($keys = 'DBGSESSID'){
return '';} else {
return current($keys);
}
}

it works for me
#3

[eluser]dennismayflower[/eluser]
I did not find this piece of code in Router.php, instead a text search of all the library files found something similar in URI.php in the function _fetch_uri_string()

Code:
if (is_array($_GET) AND count($_GET) == 1)
            {
                $this->uri_string = key($_GET);            
    // My patch to make PHP-ED work because it inserts a DBDSESSID into the url
    // based on a patch http://ellislab.com/forums/viewthread/59944/
    // Friso Seyferth
                
                $keys = $this->uri_string;
                                                          
                if ($keys = ‘DBGSESSID’){
                return ‘’;} else {
                return current($keys);
                }
                                                                                                    
                
                return;
            }

this is what i changed it to (just search for the string and you'll find the original code, i should have put the original code in as well, i know, but i am in a hurry).

now lets hope this works... nope it didn't get tthe following errors:

Code:
A PHP Error was encountered
Severity: Notice

Message: Use of undefined constant ‘DBGSESSID’ - assumed '‘DBGSESSID’'

Filename: libraries/URI.php

Line Number: 77

A PHP Error was encountered
Severity: Notice

Message: Use of undefined constant ‘’ - assumed '‘’'

Filename: libraries/URI.php

Line Number: 78

A PHP Error was encountered
Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\system\libraries\Exceptions.php:164)

Filename: errors/error_404.php

Line Number: 1

404 Page Not Found
The page you requested was not found.

ok i will continue my quest to get phped to work with codeigniter - these things are often problematic with frameworks etc.
#4

[eluser]dennismayflower[/eluser]
It looks like I solved the problem, also through nusphere's thread on their forum :

http://support.nusphere.com/viewtopic.ph...odeigniter

i am not sure if this is absolutely necessery but

1: In PHPED: Tools->Settings->IDE->Run & Debug
set Default Browser: Windows Internet Explorer (Embedded Browsers do not work for me)
2: In Explorer: View->Toolbars->Nusphere Toolbar
3: Browse to your page
4: Press Debug on the Nusphere toolbar

And the debugger should start and work.

If you need to use breakpoints check this thread: http://support.nusphere.com/viewtopic.php?t=1314. The DebugBreak() function is a party of DBG it seems and is not in the PHPEd manual.

Version 2.04 (free version)
Client part for both Linux and Windows.
Profiler. Now you can find bottlenecks of your script easily.
Code-page support. Now your IDE shows script and respective strings in certain language you have selected.
DbgListener COM interfaces added.
Two functions added: DebugBreak() and OutputDebugString(string) for software breakpoint and logging respectively.
Breakpoints are available at any time of debug session: before and after script loaded where breakpoint to place to.
Speed-up. Many parts of code have been rewritten to be speedy.


from http://dd.cron.ru/dbg/relhist.php

If you're running with xammp as i do, follow the instructions that you can find on the nusphere site and add the following to your php.ini file
Code:
[debugger]
debugger.JIT_enabled=On
debugger.hosts_allow= 127.0.0.1 localhost
debugger.hosts_deny=ALL
debugger.ports=7869, 10000/16

Especially : debugger.JIT_enabled=On seems to be important for debugging with phped.




Theme © iAndrew 2016 - Forum software by © MyBB