Breakpoints

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have read recently that

"Data break points are not compatible with the common language runtime &
cannot be used in C#"

By a data breakpoint, it means a point where a value changes to false or
simply changes.

However, I checked this out & yet the breakpoint occurs if the value changes
or evaluates to false if I set it to do so.

What does this mean "not compatible" ?

Thanks for any thoughts
Ant
 
I should add that it can be useful when dealing with unsafe code (i.e pinned
objects).

Cheers,

Greg
 
Thanks for your reply. I think I understand why it shouldn't be used,
(managed code shifts the address around) but in practice, I can't seem to get
it to cause any erroneous results. What situation could cause a problem. i.e.
How could I set this up to actually see a problem occuring. I've tried it by
incrementing a local variable but can't seem to see any problems.

It's no big deal but I'm just curious.

Thanks anyway for your ideas & the link.
Ant
 
You drop deep into the magic that is the runtime on this one.

I would imagine you would have to cause heap fragmentation (and a re-order)
to get this to occur. I am unaware of a deterministic way to have this
happen but I assure you that someone much more in depth with the CLR has
written a blog post. I would check the CLR member blogs to see if you might
be able to find this.

I will try poking around a bit later to see if I can find one .. never had
to do this before but it is interesting :)

Cheers,

Greg Young
MVP - C#
http://geekswith blogs.net/gyoung
 
Back
Top