Import and Export Breakpoints in Visual Studio

By | December 11, 2012

 Visual Studio saves breakpoints in a XML file. To save the breakpoints, you just need to click on the “Export” button in breakpoint window as shown in the following figure.

You can use the saved XML file for the future and you can pass the same to other developers. You can also save breakpoints based on the search on labels. Let’s have a quick look inside the content of the XML File. The XML file is a collection of BreakPoints tag within BreakpointCollection. Each breakpoints tag contains information about the particular breakpoint like line number, is enabled, etc.


If you delete all the breakpoints from your code at any time, you can easily import them by just clicking on the Import breakpoints button. This will restore all of your saved breakpoints.
Note: Breakpoint Import depends on the line number where you have set your breakpoint earlier. If your line number changed, breakpoint will set on the previous line number only, so you will get breakpoints on unexpected lines.

Want to know more debugging tips and tricks : Mastering in Visual Studio 2010 Debugging