Coding less and debugging more has always been part of programming. Debugging of code is always accompanied by locating appropriate break-points and inspecting program execution. But locating break points again and again whenever a solution is opened for debugging consumes time. When we feel the program execution is happening as expected, then we either delete break-points or disable them. Overall, programmers spend few minutes for break-points activities.
Visual Studio 2010 comes with a new feature of exporting and importing break-points in an XML file. So when we are done with break-points, we can export and save at a physical location. Then, delete the break-points (Ctrl + Shift + F9). Whenever we require break-points again in code, we can import the settings file that we saved last time. This XML file contains all the required settings of break-points in the code like line number, file name, etc.
Snapshots shown below are self-explanatory for .NET programmers.
Open break-point window (Ctrl + Alt + B).
Figure 1: Exporting break-points
Figure 2: Importing break-points
After importing break-point XML file, the break-points are again set at lines and files where break-points were set originally.
Figure 3: Break-point XML structure
Cheers!
CodeProject
Filed under:
.Net Technologies,
C#/VB.Net,
CodeProject,
Dot Net Tips Tagged:
.Net 4.0,
Debugging,
Visual Studio 2010