Presenter:Mike Taulty
Visual Studio 2005 has great new features for seeing your data in the debugger. This session looks at Data Tips and Visualisers in the debugger and how you can write your own visualiser.
The following text is a software generated transcript of the video. Click on a minute link to jump to a location within the video
Minute 0
Hello and welcome to this and is the end of the session 1 in a series of short sessions will be spent 10 minutes also looking at key concepts of features within visual studio net frameworks and languages mines might Tolkien I work in the developer and platform group in Microsoft in the UK and in this particular session or spend time looking at new features in the visual studio 2005 debugger particularly to feature school data tips and data visualises so if we got straight into visual studio here I already gone ahead and build project in this particular case just to illustrate the eclipse of visualises every gun on this thing up analyst Donald Love the solution to visual studio and is not vitally important to look at what the coach doing here it s a short piece of code and all that is really doing here is playing around with some datasets are flooding from a database as converting that into XML in order to get that into a string
Minute 1
Sophie Conran this code up and hit breakpoint in the debugger we can take a look at what s happening and we arrived and are breakpoint and the idea of data tapes is there rather than when you try to the values of variables are you debugging sessions you in the past was that a switch to a separate watch window to do that in 2005 what you can do is bring the data took on a variable is a simple Santa gives hover over a variable you can see that the stress leading to the value of ex zero and I can change this right hearing in line and change text of a five at the moment and that will change value of ex all we can hover over more complicated variable like a dataset appear and fully explore the object right here in line in the debugger so I can just go and expand this thing out and see that we get all the properties of the dataset and we can let this Windows scroll down and we don t see all the tables inside the dataset of the expand and
Minute 2
Tables out and you can see the details of this table around in there somewhere is a lesson we can see what those different things look likely to got one table and were starting to get a little bit lost at this point but nonetheless we can wander fully through any object and zoom through just that you couldn t watch window out with these data tips right here on the screen of the debugger disomy conduct with any object we can go and explore any of it can adapt to go and explore it on screen and it seems to the command and so on and so forth and wander through all these different things and that is that one can also let this one and wander through the select the man you can see what that thing is and it s all there on screen and in it would be true to say that while such better than having to switch to watch window there is still some wins to be had here so that in the sense that if I hover over a data set here and go through suit it still isn t particularly obvious to me
Minute 3
What the data is the activists inside the latest so to supplement dated it to have a feature called data visualises which goes one step beyond what the data that can do for us to rise her ears and a bit of technology like to show you what s inside a variable and we have visualises the certain classes within the net framework shipping as part of visual studio 2005 dataset is one of those classes and any class that has visualise when you hover over this way what you get is little magnifying glass on the right hand side here but says there at this one visualise of the estate it up and have a low key considered as a data set visualise a better click on and what happens is visual studio gizmo to update the data set visualise a new concede that turn this visualise clearly displays what the contents of the dataset is to have no doubt at this point and it obviously has a lot more productive field
Minute 4
See what s inside you data set here as opposed to trying to read all the way through the object model to see what s in there somehow visualises for the dataset was visualises forums drink so if we don t look at the string down here you see that this string acid contained some XML but it s not very obvious what the XML really looks like by just looking at the bay to take there but frustratingly however a number of different visualises consumer got a text one and XML one and HTML 1 if we look at the XML visualise only see very quickly that it s now up immediately obvious what the contents of this variable is so we can see that this is what XML looks like receipt is only what easy to debug using that it is by trying to hover over this string getting a watch window and try and work out if this XML well formed what s in there and so on and so force these are really nice features data tips and data visualises
Minute 5
What s even better about them than what we ve just seen is that you catch to take full control as to what data tips display for your own data types and he collected Bill Dato visualises for types of the net framework is if they don t really have them or you can build visualises for your own types if you have a customer object or a bank account or get whatever it might be you can build the delight of those things now terms of controlling data tapes at the likely look at that in a separate session and because is overlap between data tapes and just general debugger display of the variables so will have a separate amnesty end of it on how to control what the debugger displays for your data types but in terms of data visualises were likely look at how we can write one of those visualises here in this session so let s take a look at how we can write to visualise that this figure net framework objects live cam lets that hash table which is just a collection grass from version 1 of the net framework and as if we
Minute 6
I visualise for hash table airline has table already exists and is deployed in applications okay so what would it here is just a final new project and will go and see sharp hand class library and call this demo it visualise and with finesse rather than as said in my case and will dislocate that and into that project will do is go to solution explorer and added new item and he considered one of the things it can add his debugger visualise and with his callout time mikes visualise and out into the project Gazeley could you or it gives me hear areas and a new class might visualise it derives it from the dialog debugger visualise as this is a framework class there are other types of debugger visualise is that this is one of a crop in a separate dialogue on screen and you can see that what it gives me a
Minute 7
Zone and method call show and what that s got to do is to show the data from the debugger and this thing is going to be provided with the data that it needs to show and you can see that the template that already comes in gets hold of that data and then it has some pseudo code fur for putting a form of the screen to a safety what I need to do is get my data out of this object provider and display it uses a performance great so let s make this code do what we want and firstly what would it is going to be working with hash table saw that brilliant system collections rather than the generics at groundless flats and is constantly got here at the moment and the 22 ears data that comes back here is going to be hash table rather than any old objects and let s call this a hash table fantastic to be hash table which is
Minute 8
And metals articles table this is more realistic than data so we got not know what it is displayed as a form of the screen now for it and built a form that will display the hash table in fact anything that influence my dictionary add that form into this project rather than an satiric try to get a foreman in front of you so let s go and add an existing item and a single dictionary forms on to add that into the project and if you look at this reform is a very simple thing has a table lamp where it can display the data button to dismiss the form and if you look at the code for this length then assess your see that it gets constructive with something the influence of dictionary and it populated rid of database on that dictionary by just going through the the keys of the funniest of all those things into columns on screen to build a very simple thing I had a lot of this code and instead of a display for here is not whether reformers would be dictionary form
Minute 9
Having to create a dictionary form and that thing will once suntan a dictionary which are considered to the table and at that point we should go to show that on screen be tempered also at the test method in fully deluged with Shimizu and remove that and at that point we ve just built visualise is just make sure the code actually compiles to register that here and it s into compiles that is not looking reasonably good but were almost ready to go here the only thing we haven t done is any work here too it is higher up this visualise a class with the type of thing that it actually visualises so the debugger would need to know what to use Mike s visualise of four how does it know that this is supposed to use the hash tables tour at the ways that we can do this one is the hour on a particular date type we can put on
Minute 10
Who died to tell it which visualise to use but in the case of how stable that s not going to work because hash tables already deployed and I can t go and alter the implementation of hash table is aware that he do in this case is put at a result of this assembly to tell the debugger that this assembly and contains a visualise for a hash table to the would go ahead and do that is only to add an assembly attribute and the actually actually lives in the system diagnosticslittle debugger visualise and what we can get this thing is the type of the visualise as an artist that is going to be demoed visualise m is visualise and also found a court target which enough it is going to be hash table top sale is that this visualise visualises this type which is hash table so if it is revealed at this point and build works
Minute 11
And we ve now be ready to deploy this visualises over the debugger can use that there is so much switch to a second project over here where we are making use of Ashton or so his simple consul application if you make a hash table we adds three things to accuse values in there and in this outbreak on as runners up to get in right now what was says that Halstead was displayed here and you can see that it is no visualise of laughing a moment of suit and exploring the data which is nearly as useful as my visualise reluctantly but that s not really the point of all doing here if we start dividing and we take the visualise that we just coded it so find this product to the folder and for my visualise which is here so he is natural visualise resembling a free copy this alligator droplets at today into a folder which is essentially a program files Microsoft visual studio rate Commons
Minute 12
Packages debugger visualises along party to remember there as a pace that thing in some demo visualises now in that folder and we go back to that debugging session run again policy running at the breakpoint ears that have stable should now have very new and exciting visualises register for it is one we can still add every click on thing then we should get the visualises of which is built on the screen and you can see that we do this is my dictionary form and an oddity with his display in the valleys from the hash table Sophie can see and that really just a few lines of code if we go back to the example from second and really all we wrote was this band of the debugger gives you the objects to display and you essentially have to go on display at an odyssey certain out of that which is building a former in my case it s a very simple form since taking control of visualises in writing your own fear on both sides of various
Minute 13
Doublethink to be able to do anti gun it right Lakota died an lot of effort doing it and also those particular types within the net framework that you want visualises for that we don t share then you can own build those things or chances are other people will build on as well and then drop them on to the Internet and sell to we took a look at Dan how we can control visualises and build our own we looked at data tips said in the following session with a heavy can control what comes out for variables generally in the debugger and Holdsworth expected formatting is well so just as a quick recap was summery here we looked at data tips on visualises and that will debugging we can get some great productivity improvements over the outages hover over things on screen with data tips and soon through a complete object model and even change things in the state that it or if that is not quite enough we can go further and I have visualises displayed on screen there are certain once built in have the net
Minute 14
But types such as datasets and strains and if you don t want to use those or if they don t cover your datatypes you can actually build your own seek and build visualise your own data types or you can build visualises that a prototype to somebody else gives you an prime example being the net framework finally said that in terms of customising what is this life Friday to take a look at either a subsequent session around controlling what is displayed in the debugger for your own datatypes just to finish over here what can you do if you want its more information on visual studio 2005 well there s a whole MSDN developer Centre outfit and is to end on Microsoft com BS as five I urge you to go out and grab a copy of one of the express editions of year 2005 saw in their current beater to form their up and is the end of Microsoft com express and you can just download the singular and to register anything like that describe them straight away or it is only specifically want to
Minute 15
Grandly sessional feedback on an assassin then feel free to drop me a mail and an talk to Microsoft comalt I ll get back to you other than that they give it tuning in and there was unit that
Click here to go to original video page
Thursday, July 24, 2008
Video: Mechanics - Working with Data Tips and Visualisers
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment