CLI debugging question
concrete/bin/concrete5 c5:exec src/myscript.php
this works ok, but it makes it impossible to debug as I can't run the script from within my IDE (NetBeans).
Once upon a time, I had a PHP template that properly loaded all the stuff C5 needs and in there I could put my code and run the script directly. I don't have it anymore, and it would be quite outdated by now. I am wondering if anyone has such a template or knows how to make one.
#!/usr/bin/env php <?php $DIR_BASE="/my/working/dir/"; require $DIR_BASE . '/concrete/bootstrap/configure.php'; require $DIR_BASE. '/concrete/bootstrap/autoload.php'; $app = require $DIR_BASE . '/concrete/bootstrap/start.php'; use \Core as Core; use \Config as Config; use \Page as Page; ... <additional "use" commands> ... <rest of your code>
Note: with this addition usign only
throws a warning about useless args or something... you need to use "use" thusly
use \Core as Core;