Symfony, netbeans 6.8 and web page debugging

I am using Symfony (1.31) - with Propel ORM to create a website. I recently switched from using a text editor to Netbeans (6.8) as my dev environment.

Based on the background of the compiled language (C ++), I use to set breakpoints in the code, etc. as part of debugging. The web development I came across (at least with PHP) pretty much hit and missed - well the debugging was at least messy, using echo instructions, writing stuff to a file, etc. I heard that you can debug PHP (i.e. set breakpoints, etc.).

I looked through the documentation network to show how to set breakpoints (say, in one of the MVC layesr elements) so that when you open the corresponding pages (s) through the browser, the breakpoint is deleted and I can go through the code (ideally, viewing software variables).

Can I use Symfony and Netbeans 6.8 ?.

+3
source share
4 answers

XDebug support seems to be: http://netbeans.org/kb/docs/php/debugging.html

If you have specific questions about configuring XDebug: http://wiki.netbeans.org/HowToConfigureXDebug .

More useful articles on PHP development at NetBeans: http://netbeans.org/kb/trails/php.html .

, .

UPDATE: NetBeans 6.8 XDebug. NetBeans Symfony , +1 , .

+1

Symfony:

- /appname/config/settings.yml. . .

dev:
    .settings:
        web_debug:              true
        logging_enabled:        true

var_dump() print_r() , . ; - .

echo '<pre>';
vardump($something);
echo '</pre>';
exit;

. , , :

sfContext::getInstance()->getLogger()->info($message);
+1

Gubed Quanta + PHP, , Netbeans, , , . , (i = 0; < ~ 6; ++) { /; ; ;} , , .

Xdebug - PHP, , Neatbeans . Xdebug (. ), , , , , .

Typically, with Symfony, I find that I can get most of what I need from the stack trace, or drop the items into the logger and collect them using the debug toolbar or firesymfony .

0
source

Netbeans 7+ has problems with xdebug breakpoints in the model / action. You must use the manual function to set breakpoints.

xdebug_break();
0
source

Source: https://habr.com/ru/post/1729591/


All Articles