How to debug a Laravel application in PHPStorm?

I have an AngularJS + Laravel application and cannot configure debugging. In the project root folder, I have a PHP file, and the debugger always breaks in this file. I am using PHPStorm and not marked "First line settings"

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 "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 Configuration

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

I use php artisan servedev on my local machine.

+4
source share
1 answer

my 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"

and debugging settings phpstorm enter image description here

then set breakpoints anywhere on route.php. run debug and check url port, abc .... com ..... / rapor? XDEBUG_SESSION_START = 12360 <= its changes every time.

0
source

All Articles