I would like to set breakpoint all Convert.ToInt32
lines.
I have tried to replace all Convert.ToInt32
to System.Diagnostics.Debugger.Break(); Convert.ToInt32
but it did not work because some of the Convert.ToInt32
methods are parameter. So I wrote a regex replacement which insert the System.Diagnostics.Debugger.Break();
at the begining of the all Convert.ToInt32 lines. It seems working but is there any easy way of doing this?
ps: I do not think "Debug -> New Breakpoint -> Break at Function" works with System methods.
Update: I have written a small code
class Program
{
private static void Main(string[] args)
{
int test = System.Convert.ToInt32("x");
System.Console.Write(test);
}
}
I have changed my "Tools -> Options -> Debugging" settings
But it is still not working
Turn off the "Enable Just My Code
" setting in the Debugging configuration and Enable .net framework source stepping
. Now you can add Break at Function
option
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With