The Best of Visual Studio 2010: How to Import and Export Breakpoints

Tips Search

If you like the tips then you'll love the book!

Order your copy today:
http://www.amazon.com/gp/product/0735649928

The Best of Visual Studio 2010: How to Import and Export Breakpoints

  • Comments 2

Command:  EditorContextMenus.CodeWindow.Breakpoint.BreakpointExport; DebuggerContextMenus.BreakpointsWindow.Exportselected;
Versions:  2010
Published:  1/28/2010
Code:  vstipDebug0003

 

Ever just wanted to email someone your Breakpoints?  Maybe do a mass change to all your breakpoints at once with a text editor?  Or just save them in case you mess them up doing something else?  Well you can do it all with the Import / Export Breakpoint feature!  Here is how it works:

1. Set one or more Breakpoints in your code

 

2. Open the Breakpoint window (CTRL + ALT +B)
 

3. Notice the new "Export" button.  Pay attention as it WILL EXPORT ONLY BREAKPOINTS MATCHING THE CURRENT SEARCH CRITERIA!!  In other words, if you don't see the Breakpoint in the Breakpoint window then it WILL NOT BE EXPORTED.  Just saying.
image

 

4. When you click on the "Export" button you get the classic "Save As" dialog and notice your breakpoints are saved out as an XML file:
clip_image006

 

5. Put in some cool name and save your Breakpoints out. 

 

6. WARNING:  Don't do this next part unless you are just practicing these skills on a non-production project solution.  Delete all your Breakpoints.

 

7. Now click on the new "Import" button:
image

 

8. Choose your XML file you just exported and click "Open" then see all your Breakpoints magically re-appear!
clip_image010

  • This is so useful. That way, once I set up a bunch of breakpoints to get at the root of complex problems, I can save them for when I might be needing them later.

  • How do you export Bookmarks?  Seems odd to be able to export breakpoints, but not bookmarks.

Page 1 of 1 (2 items)
Leave a Comment
  • Please add 8 and 7 and type the answer here:
  • Post