Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Subcontrollers and breakpoints


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.


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

File mappings is correct


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();