phpstorm怎么配置到xampp上

phpstorm怎么配置到xampp上

需要準備:

·phpstorm 8.0.1

·xampp5.6.8

·chrome瀏覽器

立即學習PHP免費學習筆記(深入)”;

由于xampp中集成了mysqlapache,xdebug和php,因此不用格外下載。

步驟:

1.安裝xampp

2.打開xampp文件夾找到php文件夾中的php.ini文件,用notepad打開后可以看到文件中有以下代碼

[XDebug] ;zend_extension?=?"D:xamppphpextphp_xdebug.dll" ;xdebug.profiler_append?=?1 ;xdebug.profiler_enable?=?1 ;xdebug.profiler_enable_trigger?=?1 ;xdebug.profiler_output_dir?=?"D:xampptmp" ;xdebug.profiler_output_name?=?"cachegrind.out.%t-%s" ;xdebug.var_display_max_data=4056 ;xdebug.var_display_max_depth=5 ;xdebug.remote_enable?=?1

我們需要將代碼錢的“;”去掉后再后面添加以下的代碼:

xdebug.remote_handler?=?dbgp xdebug.remote_host?=?127.0.0.1 xdebug.remote_autostart=1 xdebug.trace_output_dir?=?"D:xampptmp" xdebug.remote_port=9000 xdebug.idekey="phpstorm"

保存文件后需要查看xdebug是否安裝成功。以下有兩種方法:

(1)打開xampp control.exe,啟動apache和mysql點擊apache中的admin按鈕進入的網頁中點擊php.info();查看其中是否有以下信息:

? phpstorm怎么配置到xampp上? ? ? ?

若有次信息,說明xdebug安裝成功。

(2)打開cmd輸入d:xamppphpphp.exe -m(前面路徑為你安裝的路徑),查看是否出現以下信息:

phpstorm怎么配置到xampp上? ? ? ??

如果出現最后兩行的信息則說明安裝成功。

相關推薦:《phpstorm怎么配置到xampp上

3.安裝phpstorm

打開phpstorm中的setting,如下圖配置:

phpstorm怎么配置到xampp上

phpstorm怎么配置到xampp上? ??

然后再打開setting,如下圖配置:

phpstorm怎么配置到xampp上

phpstorm怎么配置到xampp上

4.安裝chrome瀏覽器

打開瀏覽器,打開選項中的更多工具中的擴展程序,在網絡中下載一個Xdebug helper,將后綴為crx的文件直接拖入此頁面,安裝后點擊選項后配置如下圖:

phpstorm怎么配置到xampp上??

5.重啟apache后,在phpstorm中寫一個php的小程序,再將phpstorm怎么配置到xampp上此圖標點擊變為phpstorm怎么配置到xampp上開啟監聽。

6.

?phpstorm怎么配置到xampp上

phpstorm怎么配置到xampp上

添加start url如下圖:

phpstorm怎么配置到xampp上

其中的demo是我的工程名,demo.php為需要調試的程序名。

7.配置debug

phpstorm怎么配置到xampp上

?點擊fix按鈕,進入下一個界面

phpstorm怎么配置到xampp上

點擊添加按鈕選擇other local。

選擇php所在路徑如圖:

以上就是

? 版權聲明
THE END
喜歡就支持一下吧
點贊15 分享