How do I create a conditional breakpoint in Byebug about a variable assignment? This is more an event than a condition. But how would you proceed if you do not know where in the code the assignment could happen?
Watching a variable in step by step manner isn't delivering results. I would need to watch it, until some arbitrary value is assigned to the identifier.
I only know that an Identifier is somewhere in the Rails program, maybe even in the initialization process, is assigned a value to. I don't know when or what. The "what" is what I want to find out. Is there a debugging solution?
E.g. if you know that the variable starts off as nil
Then scatter that statement around your code wherever that variable is in scope and you suspect it may be changed. Or if you want to restrict it to a certain operation or loop, set a global variable where you want to start looking like
This is one of the few contexts where I'm happy to use global variables.