- Home /
Unity3d/Mono equivalent ot break-on-variable-change?
Hi - when developing with C# in Visual Studio, I can put a breakpoint on a changing variable - execution will halt on the line that changes that variable. I'd like something like that right now, because I have these MeshRenderers that are having their enabled flag set to false and I don't know where or how it's happening. But it's happening after Awake, so if I had a way to put a breakpoint on the enabled flag I'd be able to find it. Can that be done, or is that not supported in Mono?
Answer by sparkzbarca · Nov 15, 2012 at 04:44 AM
press F9 on a line of code to insert a breakpoint.
right click on the red circle that appears.
Breakpoint properties
there is a break on variable change
view->debug windows-> watch
allows you set variables to watch.
Not quite what I'm looking for - with Visual Studio, you can set it to break anywhere the variable is changed. Like hardware breakpoints, except maybe they're implemented in software these days, I'm not that savvy about it anymore. But with mono, it still doesn't break until it gets to that line, and by then it's hard to know what changed it.
Answer by sfilo · Nov 12, 2014 at 04:23 PM
Hi - i know this is an old post but did you find a way to achieve what you wanted?
Your answer
