Ok figured out the error.. it was not a debugger error but php mysqli initialization parse error.
i used a function to read data from a ini file it was like this
$ba = new mysqli(function('some value'), function('some value'),function('some value'));
Which results in a bugged internal mysqli object no idea why.... if i do it like this
$a= function('some value');
$b= function('some value');
$c= function('some value');
$ba = new mysqli($a, $b, $c);
All is ok....

which is annoying the hell out of me.... i even turned of teh casher and everything but the bug still was present even if i did not use the debugger in some cases ....