Did you know– You can Drag-Drop & Copy-Paste code inside Watch Window in Visual Studio?

Did you know– You can Drag-Drop & Copy-Paste code inside Watch Window in Visual Studio?

Watch Windows is one of most powerful and commonly used debugging tool inside Visual Studio.  This tool is commonly used to explore the objects, values, properties and other aspect during debugging.  To inspect any object, while debugging we generally right click on the code block and select “Add to Watch” to explore or we can also the keyboard shortcuts as well.

Well, you can drag and drop the code expression from Visual Studio Editor to Watch Window .

CopyWatch

The drag and drop also works inside watch window as well.

 

Related Tip : Different Types of Display Format with in Watch Window

 

Similar to Drag & Drop, you can also do a copy and past the code expression inside Watch Window.

CopyWatch1

This works really interestingly when you are using Multiple Watch Window as well.

 

Related Tip : Calling Methods From Watch Window

 

CopyWatch2w

You can refer to one of very old post – 10 Tips you should know about “Watch Window” While debugging in Visual Studio

Hope this helps !

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.

3 Comments to “Did you know– You can Drag-Drop & Copy-Paste code inside Watch Window in Visual Studio?”

Comments are closed.