Koobz
Koobz

Reputation: 6938

Debugging - Any way to alert if a variable is modified (Break on write)

Most debuggers have a watch function but I find it's kind of useless. I want something like "break on write" so I can tell where my data goes awry.

I work in php, python, javascript. A feature like this would be handy in every language.

Maybe the watch functions of most modern debuggers have this tucked away somewhere and I'm not aware of it. If that's the case, facepalm. Otherwise, I'm open to suggestions!

Upvotes: 1

Views: 121

Answers (1)

Paul Nathan
Paul Nathan

Reputation: 40319

It's called a watchpoint or a data breakpoint. They were developed in the late 60s and the 70s.

gdb has them.

Upvotes: 2

Related Questions