When running an artisan command on Windows that contains an error the error message is shown without a line-number on php 7+.
On php 5.6 the error is shown with the line number.
This does not happen on all files, for instance adding an error to the actual artisan file will show the line number but adding an error to MigrateCommand.php will not.
php artisan - the line number will be shown with the errorPHP 5.6
PHP 7

@SirriC can you try running PHP script that throws an error? do you see line numbers?
@Dylan-DPC Yes, if I have a simple php file with an error it鈥檒l show the line number.
I also get line numbers up to a point in Laravel, so I can edit some files and see them but then they stop showing. I think it might be when the errors are handled by Symfony - see the bottom screenshot in my original post. The first time I run artisan it files the error on line 16. On the second run the error is much deeper into the application and no line number is shown.
It turns out this is not just on Windows. My colleague was actually running php 5.6. I have also tried php 7.1 on two linux machines and neither show line numbers for errors.

Try running with the -v option
Use --verbose to get more information about the error if you want.
This is still a serious issue, and -v or --verbose has no effect in my Install. Why is this closed?
Agreed, having same issue here....
I'm having the same issue. Using Windows 10, PHP 5.6, Laravel 5.4. --verbose flag doesn't work:
For those experiencing a similar issue, I found that's it's more verbosely logging the error in storage/logs/laravel.log
Seems to be an issue with the php.ini being shipped with PHP >= 7.0 (possibly earlier too if a newer version of Xdebug is used). Since Xdebug 2.4 there's a new option available xdebug.show_error_trace, this should be set to 1 in your xdebug-configuration (or just your php.ini), note that this should be the php.ini for CLI, not FPM.
I.e, if using Homestead just put:
xdebug.show_error_trace=1 somewhere in /etc/php/7.1/cli/php.ini and it should work.
Discussion on Twitter about this: https://twitter.com/mattiasgeniar/status/905450118152953857
This is not related to xdebug and is still an issue for 2 years now?
Most helpful comment
This is still a serious issue, and -v or --verbose has no effect in my Install. Why is this closed?