View Issue Details

IDProjectCategoryView StatusLast Update
0000596XdebugStep Debuggingpublic2020-03-12 17:19
Reportersklar Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version2.1.0 
Summary0000596: Call breakpoint never works with instance methods, only static methods
Description

If you set a call breakpoint with an instance method, the breakpoint will never get triggered.

Additional Information

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.

TagsNo tags attached.
Operating System
PHP Version5.3.1

Activities

derick

2010-07-20 19:20

administrator   ~0001534

Hmm, I thought I had fixed this already, but apparently I hadn't. Will get to this soon.

derick

2010-07-23 23:26

administrator   ~0001541

Fixed in rev. 3329.

Issue History

Date Modified Username Field Change
2010-07-15 14:56 sklar New Issue
2010-07-15 14:56 sklar PHP Version => 5.3.1
2010-07-15 14:56 sklar Xdebug Version => 2.1.0
2010-07-20 19:20 derick Note Added: 0001534
2010-07-23 23:26 derick Note Added: 0001541
2010-07-23 23:26 derick Status new => closed
2010-07-23 23:26 derick Resolution open => fixed
2020-03-12 16:55 derick Severity major => feature
2020-03-12 17:19 derick Category Feature/Change request => Step Debugging