Eclipse for PHP Developers 無法調試PHP的controller代碼,該怎麼解決
來源:互聯網
上載者:User
Eclipse for PHP Developers 無法調試PHP的controller代碼
我的eclipse版本如下:
Eclipse for PHP Developers
Version: Helios Service Release 2
Build id: 20110301-1815
。
能夠調試view目錄下的代碼,但是無法調試controller目錄下的代碼。
view與controller的調用關係如下:http://localhost:8080/fastphp/views/sale_ba_target/set_ba_sale_target.php?CTL=SaleBATargetController&ACT=setBaSaleTarget&firstId=1&nowId=142。
在controller的代碼中打斷點時不響應,在view中的打斷點會中斷。
有遇到此問題的嗎?大家給解決一下。
------解決方案--------------------
1、php為毛用eclipse這麼大的開發工具?用editplus好了,通常調試都是加var_dump();die();自己設斷點調試的。
2、有Controller,View 應該是MVC結構代碼,先看下這種格式訪問路徑是如何定義的。(比如TP:有幾種路由格式,常用的一種index.php?m=Index&a=index,其中m表示controller、a表示controller裡面的action方法;再如Doo:未配置路由的情況是,index.php?controller=Index&action=index,這個比較明顯是訪問Index控制器裡面的index方法)這些是要根據你架構的說明來的。
------解決方案--------------------
在瀏覽器裡echo出來不是挺好麼,還方便一些。