471,356 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,356 software developers and data experts.

Break on Conditional String Instantiation

Does anyone know if there is a way to force the studio debugging to break at
any line of code when any string is initialized with a certain value?

In this case I inherited a badly written app and it would really help to say
to the debugger, stop when ANY string = "foo". I won't know when (what line)
it will happen.

any thoughts or any plugins that anyone knows of to listen to the clr for
this type of event?

Thanks


Aug 22 '08 #1
1 1408
On Fri, 22 Aug 2008 11:04:02 -0700, a <a@discussions.microsoft.comwrote:
Does anyone know if there is a way to force the studio debugging to
break at
any line of code when any string is initialized with a certain value?
I haven't tried the code downloading that Microsoft started allowing
earlier this year, but my recollection is that it provides source-level
debugging for the .NET Framework.

Assuming that's true, then you could install the .NET source download
stuff (however that works), and then set your conditional breakpoint in
the String class where it's initialized.

I think that's the only practical approach. Anything else is likely to be
too slow, as the debugger would have to single-step through each
statement. That's assuming you could configure the debugger to do that; I
don't know if it still supports that, not having done anything like that
in years myself.

Pete
Aug 22 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

26 posts views Thread by Chris Potter | last post: by
6 posts views Thread by Marc Jennings | last post: by
1 post views Thread by Jim Heavey | last post: by
2 posts views Thread by ichor | last post: by
12 posts views Thread by arnuld | last post: by
4 posts views Thread by =?Utf-8?B?Sm9obiBCZXNjaGxlcg==?= | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.