Cannot use breakpoint in subclass

In TYPO3 we use the concept of XCLASS to allow Core and user-defined classes to be extended. This is done like that

file class.someclass.php:

class someclass() {

     public function someMethod() {

     }

}

if (<some condition>) {
     include_once('path/to/subclass.php');
}

file class.ux_someclass.php:

class ux_someclass extends someclass {

     public function someMethod() {
          // code with breakpoint here
     }

}

Putting a breakpoint in the ux_someclass method does not stop the debugger, the only way I found to debug my code was to put a breakpoint in the parent class and then use step-by-step (run to cursor did not work either) until my code within my subclass was executed.

0
Avatar
Permanently deleted user

Hello Xavier,

Do you use symlinks in your project?

run to cursor did not work either

'Run to cursor' is IDE level feature and based on breakpoints.

Thank you for feedback!

0
Avatar
Permanently deleted user

Yes I use symlink. Actually in this very case I have this:


/Library/path/to/website/typo3_src -> ~/path/to/TYPO3_Core
/Library/path/to/website/typo3conf/ext/someextension -> ~/other/path/to/someextension

both
~/path/to/TYPO3_Core
~/other/path/to/someextension

are directories of my PhpStorm project and someextension subclasses a class from TYPO3_Core

0
Avatar
Permanently deleted user

Xavier,

You should configure path mappings for every 'symlink root' (see 'When do I need to set path mappings?' section in http://blog.jetbrains.com/webide/2011/03/configure-php-debugging-in-phpstorm-2-0/).
Please let me know if it help.

Thank you for feedback!

0
Avatar
Permanently deleted user

Xavier,

Do you still have the issue?

Thank you for feedback!

0
Avatar
Permanently deleted user

Hi,

Actually, not, but I was using auto-configuration (zero-configuration ?) and expected it to work as well :)

0
Avatar
Permanently deleted user

Xavier,

Unfortunately our zero-configuration is not a silver bullet - especially your case (which is quite popular) is hard to support.
Probably the warning (with suggestion to check path mappings) that you step into file outside the project will solve the problem.

Thank you for feedback!

0

请先登录再写评论。