簡體   English   中英

如何在PHPStorm中調試Laravel應用程序?

[英]How to debug Laravel app in PHPStorm?

我有一個AngularJS + Laravel應用程序,無法設置調試。 在項目根文件夾上,我有一個PHP文件,調試器總是在這個文件中斷。 我使用PHPStorm並取消選中“第一線設置”

server.php

<?php
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$uri = urldecode($uri);
$paths = require __DIR__.'/bootstrap/paths.php';
$requested = $paths['public'].$uri;

// This file allows us to emulate Apache's "mod_rewrite" functionality from the  
// built-in PHP web server. This provides a convenient way to test a Laravel
// application without having installed a "real" web server software here.
if ($uri !== '/' and file_exists($requested))
{
    return false;
}
require_once $paths['public'].'/index.php';

Xdebug配置

zend_extension=/usr/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=0

我在我的本地開發機器上使用php artisan serve

我的Xdebug Conf。

[了XDebug]

zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
;xdebug.profiler_append = 0
xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
;xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_port=9001
;xdebug.trace_output_dir = "C:\xampp\tmp"
xdebug.idekey = "PhpStorm"

和phpstorm上的調試設置 在此輸入圖像描述

然后在routes.php的任何地方放置斷點。 啟動調試並檢查url端口,abc .... com ..... / rapor?XDEBUG_SESSION_START = 12360 <=每次更改它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM