Bug hunting in the code...

is there a way to put a watch on a variable or array to find out what process is writing to it?

At present i have a “database” (a list of a couple of thousand items) that should be getting used as a reference ONLY, never written to, once it’s set up. i then have a second list (the inventory) that is getting read from and written to often. But for some reason when i update an item in the inventory it updates the refernce database and it shouldn’t do this. I want to track down which line of code is doing the “write to the database” command.
I have looked though ALL the code on the project and can’t find anything that looks to be causing this behavior! anyone got any ideas? please?

For a variable, you can make accessors for it (get/set), put a breakpoint in the setter, and look at the callstack when the breakpoint is hit.