0

How should I debug OOP level errors in Drupal8? Error messages and backtrace seem to be useless.

I have installed the pants module locally on the latest Drupal 8 environment. And got an error. Now, I know it's because of the Pants module, because it worked fine before I installed it. But the problem is that the error message and the backtrace are completely useless in debugging this problem. Please see the image attached.

Am I missing something? How this problem should be debugged, given the non-descriptive messages?

enter image description here

  • Currently we don't get any stack trace by default. we have to set below config in settings.php $config['system.logging']['error_level'] = 'verbose'; – vijaycs85 Aug 16 '14 at 12:02
  • I have seen a few cryptic errors too that aren't obvious right away. I've had a lot of success with Netbeans and XDebug together. Several development environments (IDEs) integrate with xdebug, which would allow you to go to (in your case) line 275 of file /var/www/d8/drupal/core/lib/Drupal.php to see what non-object is calling the get() method. These IDE tools will give you the stack trace at that point and will allow you to navigate down the stack to see the origin of the problem. – Rob Bailey Sep 29 '14 at 5:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.