rfc:debugoptions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
rfc:debugoptions [2011/01/14 21:39] – created stasrfc:debugoptions [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 10: Line 10:
 ===== Introduction ===== ===== Introduction =====
  
-Debug backtrace functions are a very useful debug tool. However, for big projects, the problem that often happens is that when something happens inside the code, the debug trace becomes so big it's unmanageable. This is because it includes the arguments, and those can be complex data arrays, huge objects, etc. so when the trace is prepared or printed out, the useful information is drowned in the mass of white noise.+Debug backtrace functions are a very useful debug tool. However, for big projects, the problem that often happens is that when something happens inside the code, the debug trace becomes so big it's unmanageable. This is because it always includes the arguments, and those can be complex data arrays, huge objects, etc. so when the trace is prepared or printed out, the useful information is drowned in the mass of white noise.
  
 ===== Proposal ===== ===== Proposal =====
Line 16: Line 16:
 Change the signature of both ''debug_backtrace()'' and ''debug_print_backtrace()'' to introduce ''options'' parameter. This parameter will be a bitmask, currently supporting these values: Change the signature of both ''debug_backtrace()'' and ''debug_print_backtrace()'' to introduce ''options'' parameter. This parameter will be a bitmask, currently supporting these values:
  
-Constant             ^ Value            ^ Means          ^ +Constant             ^ Value            ^ Means          ^ 
-DEBUG_BACKTRACE_PROVIDE_OBJECT    | 1          | Objects are included in trace for ''debug_backtrace()''        | +DEBUG_BACKTRACE_PROVIDE_OBJECT    | 1          | Objects are included in trace for ''debug_backtrace()''        | 
-DEBUG_BACKTRACE_IGNORE_ARGS    | 2          | Arguments are not included in the backtrace for both functions        |+DEBUG_BACKTRACE_IGNORE_ARGS    | 2          | Arguments are not included in the backtrace for both functions        |
  
  
 The default options will be DEBUG_BACKTRACE_PROVIDE_OBJECT, which agrees with current functionality for both functions. The default options will be DEBUG_BACKTRACE_PROVIDE_OBJECT, which agrees with current functionality for both functions.
rfc/debugoptions.1295041165.txt.gz · Last modified: 2017/09/22 13:28 (external edit)