We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37059
    • 368 Posts
    When developing complex snippets, I follow the recommendation to create the snippet in an external file. When I do it that way, however, I can’t see PHP errors such as syntax issues one pageload; if there are any parsing problems, bad function calls, etc., I am left staring at a white screen trying to imagine what I could have done wrong.

    This makes development very difficult.

    1. Is there a way to display errors from an included snippet?
    2. If not, how do you other developers deal with it?

    Thanks.
      Jason
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Set error logging on, and specify a log file, at the top of the .php file.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 9207 ☆ A M B ☆
        • 2,475 Posts
        PHP error reporting is set in the php.ini file, among other places. You have to customize it on each server... e.g. my dev server has full error reporting enabled.
          • 37059
          • 368 Posts
          Hmm... Why didn’t I think of that? huh
            Jason