NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
breakpoint watch by filter on value


Joined: 28 Jun 2006
Posts: 92
Reply with quote
I think a great feature would be the ability to set a dynamic breakpoint and watch by filter on a value.. Not thought fully through, what this means to me is that the user could set what strings to seek in variables not even yet defined; when any variable is assigned something containing that string, it would set a breakpoint during execution and pop up the IDE.

An example of its operation would be to find out "where the heck this output is coming from" in my Drupal cms. Suppose I want to find out where the "search" box comes from.. The Search box consists of the text "Search", an html form and fields, and some container element (a div). With this feature, I could assign a filter to watch for any variable (global, not yet existent/dynamic, whatever) whose value contains the string "search". Then, during execution, a sort of dynamic breakpoint would pop up the debugger, and my watch variable would be "$theme_output" or something with the value being, in this case, html consisting of the form and the word "search" in it.

Example:
I want to debug the following code which gets called once for every module installed, but I want to break when the variable $module local to this function is equal to or, alternatively, contains the value "imagecache".
Code:
function module_init() {
  // Load all the modules that have been enabled in the system table.
  foreach (module_list(TRUE, FALSE) as $module) {
    drupal_load('module', $module);
  }
  module_invoke_all('init');
}


Keep up the great work-- this is a most awesome tool.
View user's profileFind all posts by bcswebstudioSend private message
breakpoint watch by filter on value
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic