Xdebug Breakpoints Not Working In Laravel
I have Laravel 5.7 running on Homestead. I also have Xdebug enabled in the PHP-FPM php.ini file.
PhpStorm is validating the Xdebug setup. If I drop a simple PHP file, such as:
<?php phpinfo(); ?>
And also create a breakpoint on the server, the breakpoint is being hit in PhpStorm on the requesting the page.
However, setting a breakpoint inside Laravel doesn't result in the breakpoint being accessed, even with a simple page request.
If I set a breakpoint in the public/index.php
file, this is hit, but a breakpoint in routes/web.php
is not hit regardless of where I place it.
I'm a bit lost, please help.
Answer
Resolved. The fix lay in missing path mappings for the Laravel application files.
Adding mappings for the public/index.php and code/ directories in Prefs > Languages & Frameworks > PHP > Server fixes the issue and I can now hit breakpoints :)
Related Questions
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?