I am using PhpStorm 2018.2.1 on Windows 10.
I have Homestead Vagrant box setup for Laravel. My Laravel application is working as expected. Recently I have configured Xdebug for my PHP 7.1 and configured PhpStorm according to this article but when I am starting to debug I am getting the following error:
vagrant://C:/Users/Suman/Homestead/usr/bin/php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=10.0.2.2 /home/vagrant/Code/news/app/Http/Controllers/HomeController.php
PHP Fatal error: Class 'App\Http\Controllers\Controller' not found in /home/vagrant/Code/news/app/Http/Controllers/HomeController.php on line 8
PHP Stack trace:
PHP 1. {main}() /home/vagrant/Code/news/app/Http/Controllers/HomeController.php:0
Fatal error: Class 'App\Http\Controllers\Controller' not found in /home/vagrant/Code/news/app/Http/Controllers/HomeController.php on line 8
Call Stack:
0.1118 383032 1. {main}() /home/vagrant/Code/news/app/Http/Controllers/HomeController.php:0
Process finished with exit code 255
I don't know how to proceed from here. What could be the problem?

HomeControllerclass directly bypassing the whole framework code and therefore missing composer's class autoloader (that's whyControllerclass is not found). You need to do Web Page debug and not PHP Script (which is CLI environment). Start here: confluence.jetbrains.com/display/PhpStorm/…