How to export (and import) breakpoints in Visual Studio

Exporting breakpoints from Visual Studio can be super helpful when you need help from a colleague to recreate a bug and/or fix an issue which you’ve already started debugging and you don’t want for them to start their investigation from the beginning.

There are two approaches to exporting breakpoints in Visual Studio.

The first is just to explicitly select the breakpoints you want to export and then right click and select ‘Export selected…’ as shown below…

The second approach is to filter breakpoints by certain search criteria and then export all matching breakpoints by clicking the export icon button shown below. For example below I’ve searched for the word ‘console’ in all visible fields and only one breakpoint has been found…

Breakpoints are exported as XML files which you can name as you please… eg. breakpoints-to-recreate-bug1234.xml etc..

Importing breakpoints in Visual Studio

Importing breakpoints is super easy… just click the import breakpoints from a file icon in the Breakpoints window as shown below…


… and select the relevant breakpoint XML file from your disk and the breakpoints will be imported as shown below…


Note… sharing Visual Studio breakpoints like this works best when the codebases of the exporter developer matches that of the importer developer. If a breakpoint from line 10 was exported but the importing developer has changed code and line 10 is now line 20 in their codebase, the breakpoint will be created on line 10.

Leave a Reply

Your email address will not be published.