Produce a Stack Trace without an exception?

Hi folks,

I’m trying to debug a process where something is causing a property to change unexpectedly and without watch points, I believe that using a timer that monitors the variable value every 500ms will give me as close to an answer as I can get. However, I need to determine what the current functions are on the stack to lead me to the offending code. Is it possible to display a current stack trace without raising an exception first?

Make the thing a computed property & put a break point in the setter
Much more accurate

That may work, but I have too many instances to chase down here (converted VB 6 spaghetti code). Or, am I misunderstanding how to configure the property as a computed array?

Ah you never said it was an array :stuck_out_tongue:
You can still make getter / setter pair of methods & hide the public array behind it just like a computed property
No other syntax changes and then you can put break points in the getter / setter methods same as if it was a computed property

The point being that this is a temporary measure to track down the problem. Put them back to normal properties when you’re done.

Actually, thinking through Norman’s suggestion made me realize that I was changing the property value at far too many locations. I’ve now consolidated the changes to 2 methods and the problem is gone, so one of the old changes was the culprit.