I normally use Netbeans or Phpstorm for php debugging.
Netbeans does a great job of remote xdebugging and can do all the usual stepping/watching etc .
Which is fine for most things, but it doesn't seem to want to work for stepping into eval code.
Which is a shame as it would be brilliant for debugging activity procedures.
Some folks reckon you can xdebug_break() in the procedure code and that works but I can't get it to work sadly.
It does step the code as I get the output I expect per 'step' using F7/F8, but I can't actually see the eval code or vars as I'm stepping through.
I don't really want to return to var_dump having experienced the luxury of stepping through server side code, but wondered what you guys all did for this sort of thing?
I suppose I could comment the eval line in runprocedure and dump the hash processed code into it just for the debugging work.
But does anyone known of anything decent that lets you step into and play with eval code via a remote debugger.
It would save me a load of time as I need to write and carefully test a whole series of activity procedures.
Thanks as ever !
Martin
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Debugging custom code
-
- Posts: 60
- Joined: Fri Oct 26, 2012 8:09 pm
Re: Debugging custom code
Have discovered that copying the eval'd code is quite quick for my purposes.
I just put an echo statement to get the hash processed string in runprocedure.php, and then replaced the eval with the code and a die;
and now I can step/test using netbeans and xdebug.
Saved me loads of time today!
cheers
Martin
I just put an echo statement to get the hash processed string in runprocedure.php, and then replaced the eval with the code and a die;
and now I can step/test using netbeans and xdebug.
Saved me loads of time today!
cheers
Martin
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: Debugging custom code
Martin,
You can echo a value to zzsys_trap using nuDebug();
http://wiki.nubuilder.com/tiki-index.ph ... g_pString_
Steven
You can echo a value to zzsys_trap using nuDebug();
http://wiki.nubuilder.com/tiki-index.ph ... g_pString_
Steven