We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Mr. Andres help us how to debug stuff :-)

@andresgutierrez can you show me ( us ) how to debug the C code "easily" ?

my idea is lets take this issue for example https://github.com/phalcon/zephir/issues/1218

now... by digging around i can find the main function is there https://github.com/phalcon/zephir/blob/master/kernels/ZendEngine3/object.c#L1082

give me (us) a few tips, how to debug those values, how to compile this function ( or file ) only so I can test and var dump the values inside. I am sure its not that hard after someone put explanation of few lines to tell us.. hey you need to call this zephir function like this, and put this file aside and do it like this ...

and let the noobs like me suffering and trying to fix stuff they dont understand by at least I can try.

Thanks

//cheers to everyone with this song https://www.youtube.com/watch?v=QPbH8DSCzag&nohtml5=False :D

edited Apr '16

You can use gdb to figure out what causing a problem. I already posted it there.

Actually the problem occurs something here:

https://github.com/phalcon/zephir/blob/master/kernels/ZendEngine3/fcall.c#L349

or/and here:

https://github.com/phalcon/zephir/blob/master/kernels/ZendEngine3/extended/fcall.c#L957



85.5k

the idea was not exactly this, just some issues that appear. I am guessing he is using gcc to compile those files manually. and there is zephir_ debug function, traceroute function which i have no idea how to use them ? if you know please explain how you do it

I'm guessing you could debug it in visual studio maybe?

You can use gdb, if you want a nice GUI for GDB for Ubuntu, check this out: https://www.kdbg.org/screenshot.php

You can attach a PHP process, add breakpoints, watch variables, etc.