MantisBT - Xdebug
View Issue Details
0000596XdebugFeature/Change requestpublic2010-07-15 15:562010-07-24 00:26
0000596: Call breakpoint never works with instance methods, only static methods
If you set a call breakpoint with an instance method, the breakpoint will never get triggered.

In xdebug_handler_dbgp.c, DBGP_FUNC(breakpoint_set) always stores the function name in the function_breakpoints hash as "class::method" (line 1133 in the 2.1.0 codebase). Which sort of makes sense here, since it's just been given -a class -m method from the client, it doesn't know whether it's a static method or an instance method.

In xdebug.c handle_breakpoints(), though, the code checks whether the function is an instance or static function and then builds the name appropriately (class->method or class::method). So if it's an instance method, the name is built as "class->method" which is never found in the function_breakpoints hash.

If I change handle_breakpoints() to always build the name as "class::method" then the breakpoint is triggered.
No tags attached.
Issue History
2010-07-15 15:56sklarNew Issue
2010-07-15 15:56sklarPHP Version => 5.3.1
2010-07-15 15:56sklarXdebug Version => 2.1.0
2010-07-20 20:20derickNote Added: 0001534
2010-07-24 00:26derickNote Added: 0001541
2010-07-24 00:26derickStatusnew => closed
2010-07-24 00:26derickResolutionopen => fixed

2010-07-20 20:20   
Hmm, I thought I had fixed this already, but apparently I hadn't. Will get to this soon.
2010-07-24 00:26   
Fixed in rev. 3329.