Home  >  Article  >  Backend Development  >  Eclipse for PHP Developers 无法调试PHP的controller代码,该怎么解决

Eclipse for PHP Developers 无法调试PHP的controller代码,该怎么解决

WBOY
WBOYOriginal
2016-06-13 12:00:37806browse

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出来不是挺好么,还方便一些。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn