|
PHP doesn't see any code on those lines, so there can not be any breakpoint. However, if you want to break on method calls, the debugging protocol implements that. I don't know whether PHPStorm provides that functionality though.:
1 <?php
2 namespace Tests;
3
4 echo PHP_EOL . '' . PHP_EOL;
5
6 class Test { // break point here => works
7
8 static public function static_method() { // break point here => does NOT work
9
10 echo PHP_EOL . FUNCTION . PHP_EOL; // break point here => works
11
12 }
13
14 public function construct() { // break point here => does NOT work
15
16 echo PHP_EOL . FUNCTION . PHP_EOL; // break point here => works
17
18 }
19
20 public function instance_method() { // break point here => does NOT work
21
22 echo PHP_EOL . FUNCTION__ . PHP_EOL; // break point here => works
23
24 }
25 }
26
27 Test::static_method();
28
29 $t = new Test();
30
31 $t->instance_method();
Finding entry points
Branch analysis from position: 0
Return found
filename: /tmp/bug618.php
function name: (null)
number of ops: 27
compiled vars: !0 = $t
line # * op fetch ext return operands
2 0 > NOP
4 1 EXT_STMT
2 FETCH_CONSTANT ~0 'Tests%5CPHP_EOL'
3 CONCAT 0000002:0000001 ~0, ''
4 FETCH_CONSTANT 0000002:0000002 'Tests%5CPHP_EOL'
5 CONCAT 0000003:0000003 0000002:0000001, 0000002:0000002
6 ECHO 0000003:0000003
6 7 EXT_STMT
8 NOP
27 9 EXT_STMT
10 ZEND_INIT_STATIC_METHOD_CALL 'Tests%5CTest', 'static_method'
11 EXT_FCALL_BEGIN
12 DO_FCALL_BY_NAME 0
13 EXT_FCALL_END
29 14 EXT_STMT
15 ZEND_FETCH_CLASS :6 'Tests%5CTest'
16 EXT_FCALL_BEGIN
17 NEW $7 :6
18 DO_FCALL_BY_NAME 0
19 EXT_FCALL_END
20 ASSIGN !0, $7
31 21 EXT_STMT
22 ZEND_INIT_METHOD_CALL !0, 'instance_method'
23 EXT_FCALL_BEGIN
24 DO_FCALL_BY_NAME 0
25 EXT_FCALL_END
32 26 > RETURN 1
Class Tests\Test:
Function static_method:
Finding entry points
Branch analysis from position: 0
Return found
filename: /tmp/bug618.php
function name: static_method
number of ops: 9
compiled vars: none
line # * op fetch ext return operands
8 0 > EXT_NOP
10 1 EXT_STMT
2 FETCH_CONSTANT ~0 'Tests%5CPHP_EOL'
3 CONCAT 0000002:0000001 ~0, 'static_method'
4 FETCH_CONSTANT 0000002:0000002 'Tests%5CPHP_EOL'
5 CONCAT 0000003:0000003 0000002:0000001, 0000002:0000002
6 ECHO 0000003:0000003
12 7 EXT_STMT
8 > RETURN null
End of function static_method.
Function construct:
Finding entry points
Branch analysis from position: 0
Return found
filename: /tmp/bug618.php
function name: construct
number of ops: 9
compiled vars: none
line # * op fetch ext return operands
14 0 > EXT_NOP
16 1 EXT_STMT
2 FETCH_CONSTANT ~0 'Tests%5CPHP_EOL'
3 CONCAT 0000002:0000001 ~0, '__construct'
4 FETCH_CONSTANT 0000002:0000002 'Tests%5CPHP_EOL'
5 CONCAT 0000003:0000003 0000002:0000001, 0000002:0000002
6 ECHO 0000003:0000003
18 7 EXT_STMT
8 > RETURN null
End of function __construct.
Function instance_method:
Finding entry points
Branch analysis from position: 0
Return found
filename: /tmp/bug618.php
function name: instance_method
number of ops: 9
compiled vars: none
line # * op fetch ext return operands
20 0 > EXT_NOP
22 1 EXT_STMT
2 FETCH_CONSTANT ~0 'Tests%5CPHP_EOL'
3 CONCAT 0000002:0000001 ~0, 'instance_method'
4 FETCH_CONSTANT 0000002:0000002 'Tests%5CPHP_EOL'
5 CONCAT 0000003:0000003 0000002:0000001, 0000002:0000002
6 ECHO 0000003:0000003
24 7 EXT_STMT
8 > RETURN null
End of function instance_method.
End of class Tests\Test. |