Buenas,
after seeing the way of use the My Work to manage active tasks I have assigned section , today we will see another interesting feature in this section: the ability to suspend a trabajo´ environment / debug / build and then recover the same.
Let’s look at an example. Suppose that I am working with an application of console with the following code:
1: using System;
2: using System.Diagnostics;
3:
4: namespace ConsoleApplication1
5: {
6: class Program
7: {
8: static void Main(string[] args)
9: {
10: var l = new ConsoleLogger();
11: l.Log("foo");
12: Console.ReadLine();
13: }
14: }
15:
16: interface ILogger
17: {
18: void Log(string data);
19: }
20:
21: class DebugLogger : ILogger
22: {
23: public void Log(string data)
24: {
25: Debug.WriteLine(data);
26: }
27: }
28: class ConsoleLogger : ILogger
29: {
30: public void Log(string data)
31: {
32: Console.WriteLine(data);
33: }
34: }
35: }
It is not very complicated, but it deserves a bit of attention to some improvements. As well, as I decided to see what it does internally this app, because I put a couple of breakpoints in the IDE, marks on the value of a variable; I assigned my active work in the My Workpanel, etc. At the time of debugging I have the IDE in this State:
But just at this moment, my boss calls me and tells me that I must review urgent implementation of Kinect that does not work as it should. Because here the new functionality of Suspend help us much,
In the pane Team Explorer, in the My Work section, select the Suspend option and define a title to describe the State where I leave my job (only at identifying level, not worth to put “…”).
At the time of commit these changes, the IDE creates a shelveset with all elements that had been working and also holds the configuration of the IDE with breakpoints, variables, etc. Now I can open another project (or even the same!) and make the changes you need. The interesting thing is the back at this point.
When we want to return to the point where we leave everything, we can see a list of items in “Suspended Work” in the My Work section. In it we also see associated WorkItems
If we want to see changes that are associated with this element of the Suspend type, then click on “View Changes” and see the following:
In this case it is a ShelveSet that has associated WorkItems and files of code that was changed.
In the My Work section I select “Resume” and it will return to leave the IDE in the moment in which we create the point of suspend, with marks of debugging, watch, associated workitems, etc.
Saludos @ La Finca
El Bruno

Leave a comment