How to place a breakpoint in every MessageBox in my application?
In the Visual Studio IDE, select the menu Debug->New breakpoint->Breakpoint at Function...
Debug->New breakpoint->Breakpoint at Function...
Fill in the function field with the text "MessageBox".
Write a wrapper function around the MessageBox, replace all of your calls to MessageBox with this wrapper function, place a breakpoint inside your wrapper function.
Debug > New Breakpoint > Break on function. . , . , VS , , . . System.Console.WriteLine .
, , VS WriteLine, , , , VS . , , .
It may not be possible, but if you find and replace your MessageBox call and add a call (before the MessageBox is called) to the function where the breakpoint is inserted, you can step on it.
You can find and replace:
replace
.ShowDialog();
from
.ShowDialog(); #ifdef dialogDebugging System.Diagnostics.Debugger.Break(); #endif
Then define dialogDebugging in your project settings.
Press ctrl-F to open the search dialog. Search for MessageBox.Show Right-click a line of code and select a breakpoint → Insert Breakpoint
Source: https://habr.com/ru/post/1716293/More articles:Creating if -statement in jQuery - jqueryDetect Removing / Unmounting USB Mass Storage on Linux - linuxRun program from MemoryStream - c #How to find out what Dean plays in my application - c #Capture keystrokes in an ASP.NET text field - jqueryMultiple Linear Regression - mathC # Documentation - Custom Tags - c #Wordpress - несколько объектов запроса WP в одном? - objectHow do you measure site load time in IE6? - performanceconflict between jQuery slider and iui (iphone) - jqueryAll Articles