We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Subcontrollers and breakpoints

Hi,

I try implement subcontrollers in my application. All works good but xdebug ignore breakpoints in subcontrollers. I haven't idea why. Xdebug_break() working properly in subcontrollers but breakpoints not. In models, controllers etc. breakpoints works fine.

I use netbeans 8.2.

Thanks for any help.



85.5k

i havent used netbeans, but you should probably check you project file mappings

File mappings is correct



6.0k
Accepted
answer

I solved the problem. I changed the namespace to lowercase before was in camelcase and I changed register namespace on exactly folder structure.

Before in controller:

namespace MyApp\Controllers\Settings;

in loader.php

$loader->registerNamespaces( [ 'MyApp\Controllers\Settings' => DIR.'/../controllers/settings' ] )->register();

After (properly working)

in controller:

namespace app\controllers\settings;

in loader.php

$loader->registerNamespaces( [ 'app\controllers\settings' => DIR.'/../controllers/settings' ] )->register();