i hope i will get some help here.
I'm quite new to debugging in phpstorm. As php framework i use Laravel installed on XAMPP. Just to demonstrate my problem i refer to the basic code of a fresh laravel install.
The current state is the following:
- set up a fresh laravel project via composer
- downloaded barryvdh/laravel-ide-helper via composer and set it up, so phpstorm knows all classes, aliases etc.
- set up xdebug (phpinfo shows it all well and phpstorm recognizes it as my php debugger)
I tried to debug e.g. the routes.php which out of the box includes nothing else than this:
Route::get('/', function() {
return View::make('hello'); });
For the "Route" alias, i get an error:
Fatal error: Class 'Route' not found
I expected xdebug to have no problems debugging this as there is the _ide_helper.php in the root of my project and because i can click on all aliases facades etc. --> getting from class to class without any problem.
Same applies for all the other classes of the laravel framework, e.g. for the "HomeController"
class HomeController extends BaseController {
where i get the same error in the debug console:
Fatal error: Class 'BaseController' not found
For me it is not far from practice to test/debug my controllers etc. so i would be happy if i can get this to work somehow.
I hope somebody of you knows how to fix this :) Thanks in advance!
EDIT
This is the composer.json
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.2.*",
"phpunit/phpunit": "4.1.*",
"barryvdh/laravel-ide-helper": "1.*"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize",
"bower install"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan ide-helper:generate",
"php artisan optimize",
"bower install"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable"}
I also tried a "composer dumpautoload" without success.
Thanks for your effort!