Import and Export Breakpoints in Visual Studio

 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

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.