eclipse和xdebug除錯PHP配置方法

2021-08-25 07:09:30 字數 1114 閱讀 1897

工欲善其事必先利其器,要想寫好好的程式,不光要有好的思想,好的程式設計習慣,也要有乙個好的開發利器

eclipse不能不說是乙個強大的ide。

這裡已整合了pdt的配置。

放到和php.ini同乙個目錄中(也可以放到別的目錄下)

在php.ini檔案中加入

[xdebug]

xdebug.default_enable = on

xdebug.collect_params = 4

xdebug.remote_host = 127.0.0.1

xdebug.remote_port = 9000

xdebug.remote_handler = dbgp

xdebug.auto_trace = on

xdebug.show_exception_trace = on

xdebug.remote_autostart = on

xdebug.remote_enable = on

xdebug.collect_vars = on

xdebug.collect_return = on

xdebug.collect_params = on

xdebug.var_display_max_depth = 10

xdebug.remote_req = req

xdebug.profiler_enable = 0

zend_extension="d:\wamp\bin\php\php5.3.0\php_xdebug.dll" //這裡我指定了絕對路徑你可以改之

在eclipse裡的window---preferences---php---debug下新建乙個php executables

php debugger裡選擇xdebug,encoding settings 建議選擇utf8

break at first line 如果去掉的話則不會在第一行就將程式斷掉,等待你按下f5或者f6繼續

至此設定結束,開啟你的程式,按下f11。再進行f5或者f6就能除錯了,是不是很爽啊

最喜歡的就能這種能斷點能檢視變數值的除錯方式了

線上Tomcat支援Eclipse遠端除錯的方法

在bin catalina.sh,開啟 在第一行粘入 declare x catalina opts xdebug xrunjdwp transport dt socket,server y,suspend n,address 8000 在myeclipse中,右鍵點選對應的web project ...

JVM調優 對eclipse啟動調優紀實(2)

heap def new generation total 157248k,used 19646k 0x04b00000,0x0f5a0000,0x0f5a0000 eden space 139776k,9 used 0x04b00000,0x05788208,0x0d380000 from spa...

eclipse 效能調優之記憶體分配

eclipse 效能調優之記憶體分配 如果覺得自己的 eclipse 比較慢,可以通過修改 eclipse home eclipse.ini 檔案進行調整 將 xms 和 xmx 的記憶體調整至 512m 你本機可用記憶體的 1 4,2g 記憶體的話就是 512m xms512m xmx512m 然...