Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
Shin x blog Advent Calendar 2013 ã® 21 æ¥ç®ã§ãã 第 12 åé¢è¥¿ PHP åå¼·ä¼ ã«ã¦ãPHP 5.6 ã«æ¡ç¨äºå®ã® phpdbg ãã²ã¨è¶³å ã« PHP 5.5.7 ã§è§¦ã£ã¦ã¿ã¾ããã phpdbg phpdbg ã¯ãgdb ã©ã¤ã¯ãª PHP ç¨ã®ãããã¬ã§ãããã¬ã¼ã¯ãã¤ã³ããè¨å®ãã¦ããã®æç¹ã®ã³ã³ããã¹ãã確èªããããã¹ãããå®è¡ãªã©ãã§ãã¾ãã phpdbg | php debugger ã¤ã³ã¹ãã¼ã« PHP 5.6 ããå梱ãããäºå®ã® phpdbg ã§ãããããèªä½ã¯ãã§ã«ãªãªã¼ã¹ããã¦ãããPHP 5.4 ããå©ç¨ãããã¨ãå¯è½ã§ããã¤ã³ã¹ãã¼ã«ã«ã¯ãPHP ã®ã½ã¼ã¹ã³ã¼ããå¿ è¦ã«ãªãã®ã§ãPHP ã ã½ã¼ã¹ããã¤ã³ã¹ãã¼ã«ãã¾ãã $ sudo yum -y groupinstall "Development Tools" $ sud
ã¯ããã« ã¤ãæè¿ç¥ã£ã便å©ãªãããã°æ¹æ³ (é·å¹´ã·ã§ã«ã¹ã¯ãªãããæ¸ãã¦ããã®ã«ç¥ããªãã£ããããã常èã ã£ããæ¥ããããâ¦) ã·ã§ã«ã¹ã¯ãªããã®ãããã°ã§ã¯ echo ã§å¤æ°ã®ä¸èº«ãè¦ãã¨ããåå§çãªæ¹æ³ããã使ããã¨æãã¾ãã ãããã ããªã³ããããã° ã¨ãããã¤ã§ããã ããå°ã詳ãããããã°ãå¿ è¦ãªå ´åã¯ã set -x 㨠set +x ã§ãããã°ãããé¨åãå²ãã¨ããæ¹æ³ãããã¾ãã ä»å㯠ããªã³ããããã° ã§ä½¿ã echo ã®ä»£ããã« typeset or declare ã使ãã¨è¯ãã¨ããã話ã§ãã ããªã³ããããã°ã¯ typeset or declare ã使ãã typeset or declare ã¯å¤æ°å®£è¨ãªã©ã§ãã使ãã³ãã³ãã§ãããå¤æ°ã®ä¸èº«ãè¦ãã®ã«ã使ãã¾ãã echo ã¨æ¯ã¹ã¦ä½ãè¯ãã®ãã¨ããã¨ãå¤æ°ã®ä¸èº«ã¯ãã¡ããå¤æ°åãå¤æ°ã®åã表示ãã¦ããã
Chromeçã®Firebugãã¨Google Chrome Developer Toolsã§ããã以ågihyoã§è§£èª¬ããã¨ãããããã«ä¾¿å©ã«ãªã£ã¦ããã®ã§ãå°ãç´¹ä»ãã¾ã(å ã¯WebKitãªã®ã§ããã®ãã¡(è¿ããã¡ã«)Safariã§ããããªãã«ä½¿ããããã«ãªãã¯ãã§ã)ã å§ç¸®ãããã³ã¼ãã®æ´å½¢ ã¾ããç®ç«ã¤ã¨ããããããã¾ããããã¡ããã©å æ¥æ´æ°ãããChromeã®devç(12.0.742.0)ã«æè¼ãããã°ããã®æ©è½ã§ãminifyããã¦ããJavaScriptã³ã¼ããèªã¿ãããããã«æ´å½¢ãã¦è¡¨ç¤ºãã¦ãããã¨ãããã®ã§ã(IE9ã®éçºè ãã¼ã«ã«ãå®è£ ããã¦ããæ©è½ã§ã)ã ä¾ãã°ãGoogle Analyticsã®ã³ã¼ãã¯å§ç¸®ããã¦ãã¦æ®éã¯èªãã¾ããã ããããChromeã®ãããããã¼ãã¼ã«ãªãã ãã®ããã«æ´å½¢ãã¦ããã¾ãã ããæ¹ã¯ç°¡åã§ããããããã¼ãã¼ã«ã®Script
Perlããåãããªããã©æè¿ãããã£ã¦ãããã°ããããã«ãã¦ãã Data::Printer ããã¾ã§å¤ã®ç¢ºèªã«ã¯Data::Dumperãå©ç¨ãã¦ãããã©ãç¨è¯ãæ´å½¢ãã¦è²ä»ããã¦ãããData::Printerã使ãããã«ãªã£ããuse Data::Printerã®ä»£ããã«use DDPã¨ããã¨ã¤ãªã¢ã¹ã§ãå©ç¨ã§ãããuseããã¨pã¨ããæ´å½¢åºåç¨ã¡ã½ãããæä¾ãã¦ããããRubyã§è¨ãã¨ãppãå©ç¨ãã¦ããã®ãap(=awesome_print)ãå©ç¨ããããã«ãªã£ãã¨ããã¤ã¡ã¼ã¸ãããã¯é©å½ã«Selenium::Remote::Driverã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ãpã¡ã½ããã§åºãã¦ã¿ãå³ã Carp::REPL REPLã¯ã³ã¼ãä¸ã§å¦çãæ¢ãã¦Perlã®å¯¾è©±ç°å¢ãéããã¤ãããã¾ã§ä½¿ã£ã¦ãªãã£ããã©ãè¯ãããã¨ãã話ãTLã§è¦ãããã®ã§ãé©å½ã«Data::Printerå ¥ãã¦å¤ç¢ºèª
æ®æ®µWebãµã¼ããéç¨ãã¦ãã¦ãããã©ããããã©ãã«ã®ã²ã¨ã¤ã«ãSegmentation faultããããã¾ãã ããã¼ï¼ãªãã500ã¨ã©ã¼ãã§ããªã¼ãªãã¦æã£ã¦ãã°ãè¦ãã¨Segmentation faultã«ãªã£ã¦ãã¨ãã¯æ»ã«ãããªãã¾ãã ããããSegmentation faultã¯ã¡ã¢ãªä¸ã«ãããã¼ã¿ã«å¯¾ãã¦ä¸æ£ãè¡ãããã¨ãã«èµ·ãããã®ã§ã ã¤ã³ãã©ã¨ã³ã¸ãã¢ã«ã¨ã£ã¦ã¯ãªããªãæãã ããªãã¨ããã§ãããã¾ãã ããã§ããªãã¨ããã¦æ²»ããªãã¨ãããªããããªã®ã§ ããã¦ã©ã®ããã°ã©ã ãæªããã¦ããã©ãããããã¯èª¿ã¹ä¸ãã¦ã¿ã¾ãã apacheã§ã®ãã° apache + mod_perl ã§ã®ç°å¢ã§ãã ãããªæãã§ã¨ã©ã¼ãã§ã¾ãã #tail error_log [notice] child pid 26028 exit signal Segmentation fault (11
KCatch.pm 㯠Perl CGI ã§çºçãã Internal Server Error ãè£è¶³ãã¦ã ã¨ã©ã¼å 容ã HTML ã¨ãã¦ãã©ã¦ã¶ç»é¢ã«è¡¨ç¤ºãã¦ãããã¢ã¸ã¥ã¼ã«ã§ãã ã¨ã©ã¼ã®çºçããè¡çªå·ãªã©ã表示ãããã®ã§ããµã¼ãä¸ã§ã®éçºã«æé©ã§ãã å®å®çãã¦ã³ãã¼ã: KCatch-1.13.tar.gz TAR.GZ ï¼2002/07/01çï¼ éçºçãã¦ã³ãã¼ã: KCatch.pm SVN ï¼CodeReposï¼ CodeRepos ã«ã½ã¼ã¹ã移åãã¾ããï¼ï¼2007/12/23ï¼ KCatch.pm ã®ãã£ã¨ãç°¡åãªä½¿ãæ¹ KCatch.pm ã®ããé©åãªä½¿ãæ¹ããªã¹ã¹ã¡ã KCatch.pm ã®ä¸»ãªãªãã·ã§ã³ é »åºã¨ã©ã¼ã¡ãã»ã¼ã¸ ããã¥ã¢ã«ãè±èªç ï¼Ver.1.13対å¿ï¼ ããã¥ã¢ã«ãæ¥æ¬èªç ï¼Ver.1.10対å¿ï¼ KCatch ãã¥ã¼ã¹ KCatch.pm
åç½®ã ããã«ã¡ã¯ãid:ktatã§ããæè¿ã¯ãUtil::Allã¨ããã¢ã¸ã¥ã¼ã«ãããã£ã¦ã¾ãããCPAN ã«ã¯ããã¦ãªãã®ã§ãç´¹ä»ã§ãã¾ããã ã¨ããããã§ãä»æ¥ã¯ãããã°ã®ãä¾ã«ä½¿ãããããããªããTie::Traceãç´¹ä»ãã¾ãã æ¬é¡ ãã¦ãperlã®ããã°ã©ã ã®ãããã°ãããªããperl -d ã¨ããã®ãè¯ãã§ãããprint ãããã°ããæ軽ã§ããã§ãããã ããããæªããå¤æ°ã追ããããããè¦ç¥ãã¬ãªãã¸ã§ã¯ãã®ä¸ã調ã¹ããããã®ã«ããã¡ãã¡ print ã warn ãæ¿å ¥ãã¦ããã®ãé¢åã§ãã ãããªæã«ã¯ãTie::Trace ãå½¹ã«ç«ã¤ããããã¾ããã åç´ãªä¾ 次㮠$hogeã @hogeã %hoge ã®åå¤æ°ã追ãããã¦ã¿ã¾ãã use Tie::Trace qw/watch/; watch my $hoge; watch my @hoge; watch m
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}