CI 묻고 답하기

제목 phpDesigner 7 xdebug 설치 질문..
글쓴이 PII 작성시각 2011/02/09 13:04:28
댓글 : 3 추천 : 0 스크랩 : 0 조회수 : 33005   RSS

CI_VERSION 은 1.7.2 입니다.

phpDesigner 7 에서 xdebug를 사용하고 싶습니다.

      Apache 2.2.14 (openssl 0.9.8k)
      PHP 5.2.12
      Zend Optimizer v3.3.3
       MySQL 5.1.39


APM환경이고 xdebug파일은 php.ini파일에 다음과 같이 설정해 주었습니다.

       [Zend]
      zend_extension_manager.optimizer_ts="C:/APM_Setup/Server/ZendOptimizer/lib/Optimizer-3.3.0"
      ;zend_extension_ts="C:/APM_Setup/Server/ZendOptimizer/lib/ZendExtensionManager.dll"
       zend_extension="c:/APM_Setup/Server/PHP5/ext/php_xdebug-2.1dev-5.3-vc9.dll"

      [XDebug]
      xdebug.profiler_output_dir=C:\Documents and Settings\All Users\Application Data\phpDesigner\XDebugCache
      xdebug.remote_enable=on

phpDesigner 7 에서는 WinCacheGrind.exe 를 연결해 주었습니다.



브레이크 포인트를 걸고 F9를 누르면 다음과 같은 에러가 발생합니다.
Fatal error: Class 'Controller' not found in C:\PHP\system\application\controllers\board.php on line 2
Call Stack: 0.0539 419200 1. {main}() C:\PHP\system\application\controllers\board.php:0




codeigniter.com 포럼에서 환경이 살짝 다르기는 하지만 비슷한 유형인것 같기도 하고 그래도

여전히 방법을 모르겠고....


Hi there,

I have a problem with phpDesigner 7 debugger when it comes to debug codeigniter applications. The debugger works fine when debugging php scripts which are not developed with codeigniter.

I get an error when i try to debug for example a controller (Fatal error - Class ‘Controller’ not found)
Am I overseeing something ? Is my approach wrong ?

My setup: XAMPP 1.7.3 - PHP Version 5.3.1 - XDEBUG php_xdebug-2.0.5-5.3-vc6.dll

Really hope someone has a solution or a suggestion.

Thanks in advance.
Pétur.



I have a similar problem.  First to answer your question: You can’t just click run on a controller or view file and expect to debug it. CI applications start at the index.php in your root application directory and have to include all the CI framework stuff.  You can use xdebug if your IDE supports it.  I have xdebug set up correctly, but you will run into the same problem I have once you get it set up.

UPDATE EDIT

I had a symlink issue.  Disregard below.  Once you set up xdebug properly breakpoints will work.


Controllers and Views are just classes that extend CI classes…so when I set break points inside my class functions the debugger never stops on them.  It took me a while to understand why.  I need to be able to stop when the INSTANCE of my class is executing my function.  It will never stop on the class definition code.  But Where the heck would that be in the CI framework?

To summarize:

How can you get a debugger to stop on a breakpoint in a controller file when an instance of that controller is created and calls a function that you want to stop within ?


포럼 질답 링크 : http://codeigniter.com/forums/viewthread/150981/#745106



검색능력이 신통치 않아서 그런지 ... 찾을 수가 없더군요 ..

혹 CI유저분들중에 사용중인 분이 계신지

처음 시작이라 어디서 부터 시작 해야 할지 난감합니다.

감사합니다...
태그 phpDesigner,xdebug
 다음글 메일 클래스 제목 길이 제한. (1)
 이전글 흐미 swfupload는 application/octe... (2)

댓글

PII / 2011/02/09 13:06:24 / 추천 0
아참 .. 여기에서도 한분이 비슷한 질문을 봤었는데 .. 해결을 하셨는지요 ????
변종원(웅파) / 2011/02/10 11:15:15 / 추천 0
저도 좀 찾아봤는데 답이 없네요.

phpDesigner에서 xdebug 사용보다는 firefox, firebug, firephp 로 디버깅 하시는 것이 좋을 듯 합니다.
PII / 2011/02/10 12:42:29 / 추천 0
네 .. 그렇군요 .. ㅠㅠ;;
감사합니다~