Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Easy way to copy breakpoint in Visual Studio

Is there an easy way to copy/move breakpoint to another line in Visual Studio?

There are scenarios when breakpoints may contain some conditions, tracing, etc. and it is not easy to copy/move it around during debugging session.

The only solution I see now is by import/export which is not really acceptable.

like image 304
Vladimir Sachek Avatar asked Jun 29 '15 07:06

Vladimir Sachek


People also ask

How do I export breakpoints in Visual Studio?

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.

How do I copy a whole object in Visual Studio?

In Visual Studio debug mode it's possible to hover over variables to show their value and then right-click to "Copy", "Copy Expression" or "Copy Value". In case the variable is an object and not just a basic type, there's a + sign to expand and explore the object.

How do I add a breakpoint to all methods in Visual Studio?

Press F3 and then press F9 to add a breakpoint.

What is F11 in Visual Studio?

Step into codeTo stop on each statement when you're debugging, use Debug > Step Into, or select F11. The debugger steps through code statements, not physical lines. For example, an if clause can be written on one line: C#


2 Answers

What version of the Studio?

To move:

For 2013 and earlier, right-clik on the breakpoint and select "Location".

For 2015, hover over breakpoint's icon and click "Settings...". In the location area, you can change the name of the file and the line number.

There is no obvious way to copy. How bad do you need it? Someone may write an extension to do that :)

like image 123
Vlad Feinstein Avatar answered Sep 25 '22 02:09

Vlad Feinstein


You can export break point in xml file and when required import that xml file to visual studio again. There is option from export/import in break point window of visual studio.

Check this article for detail : http://www.c-sharpcorner.com/UploadFile/pranayamr/setting-breakpoints-in-visual-studio/

like image 22
Pranay Rana Avatar answered Sep 25 '22 02:09

Pranay Rana