Visual Studio Toolbox Live - C# Productivity in VS Code with C# Dev Kit

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Applause] [Music] [Applause] [Music] [Applause] [Music] [Music] [Music] [Music] [Music] hey everyone welcome to another live episode of Visual Studio toolbox live I'm your host Leslie Richardson and thanks for trickling in we are we have a really exciting topic today we are talking all about the brand new C devkit extension for s code which will help you massively improve your productivity across all walks of the development cycle from start to finish in vs code when you're writing your C applications so joining me today are s and Wendy who I'm GNA add in welcome y'all how you doing hello hello sweet so I'm really excited to talk about C devkit which has been on the brain I think on all of for all of us for a lot of months and now that it's recently gone GA it now is the time to use it right so can you two introduce yourselves and tell us more about what C devkit is for the uninitiated uninitiated go ahead Wendy I hi I am Wendy Bing I am a product manager on the uh c.net tooling um and uh experiences team and I'm going to be excited to talk about devkit I'm goingon to let Sayad introduce himself and then I'll answer the question on what is D devkit okay great yeah um Sayad Abraham hashimi um program manager working onnet features in various different places there yeah great and Wendy before you uh do your definition time uh shout out to the audience if you have any questions about the C dukit as we're chatting feel free to drop them in the chat and we will do our best to answer them all right cool awesome so if you want to um bring up my screen um you I'm sharing here uh hopefully the uh C dev kit um is a visual studio code extension that supports uh C development but it's more than just an extension it's a family of extensions that really provides a rich C editing experience whether you're on Windows Linux Mac even code spaces all in Visual Studio code and so I'm going to just kind of go through the various things C devkit when you install it will come with a set of extensions first you get this net runtime install tool um and this provides C devkit with a way for it to obtain the net runtime needed to work um if you already have the uh net SDK installed there is a way to um tell the extension that it already exists and so if I go to the um settings for the do net runtime install tool um you can see um to edit the uh the settings. Json you can give it the existing. net path um and then here I already have it set up in mine um so you want to give for both the C extension um and the C dev kit uh the the path that it will it can use once you have that all done then it won't uh try to obtain a new runtime every time uh you are using the extension going back it also installs um the C extension um which provides the base language support for C development so this gives us that rich language support um it you some of you who may be familiar with C editing in Visual Studio code may have um recognize this extension has been around for a long time previously it was powered by omnisharp over the the summer we updated it to be powered by a language serfer protocol um that then integrates with other open source components like Roslin and Razer to provide that rich type information um and a faster more reliable C experience um so this is um incredible um also what comes with the c Dev with C devkit is the intell coat for C devkit and this provides the uh AI assisted um whole line completions and stard completions that you may be familiar with with visual studio um right in your Visual Studio code experience now this is an optional if you don't want to use intell code um you you can uninstall this one once you get it the other two extensions you cannot um they are required to work together um and to add if you are a GitHub uh co-pilot user uh intell code and co-pilot work very well together um it it will it will turn off the intell code's whole line completions in order to use GitHub but the star completions are are uh awesome to use um along with co-pilots uh whole line completions and then of course C dev kit which provides a lot of really cool features around the solution Explorer and um quick easy debugging integration with test Explorer and all those cool things now I did want to add there are a couple other extensions that are part of the C dekit family um that don't get automatically installed but if you do mobile development the dotnet Maui extension for VSS code um is it you need c devkit in order to use it and it provides some really cool um added features for debugging um and editing your Maui apps um and running them on emulators simulators and devices and then the uh Unity extension um provides uh the unity debugger and unity specific analyzers refactoring and cold colorations which which is really cool yeah I love how expansive uh it is already not just in terms of the extensions that come with the CP dev kit that further enhance things but also it just being allowing you to develop C pretty much anywhere at this point right since it's a vs code extension you got multiple os's that c development is compatible with yeah this runs great on you know Mac on Linux and even in code spaces which has been incredible sweet and so we've got question number one from the chat which I think we both know the answer for already but is there a dev kit for fshp in Visual Basic too uh so there is existing extensions out in the marketplace that have provide great FSH support um ionide extension um is great and so we didn't see the need to um expand on on that since it it was already getting great Community Support um Visual Basic uh we have not heard very much need for um and and so we still recommend using visual studio for for your Vis Visual Basic editing um but we do have the the recommend the ionide for f awesome cool so kicking things off what how do we set up the uh C dve once we've install it like where do we even start yeah awesome great question so um once we once you got everything installed in the we provide this great getting started with C devkit walkth through um and this gives you kind of step by step on how to get started um and so first it tells you how to connect your account which is basically just logging into your visual studio um account that you already have um the next step in the walkthrough is making sure that you have a net SDK installed so it will the extension will run without it but if you try to run your applications um nothing's going to happen so you want to make sure that you get the right net uh SDK installed um and then it walks you through the basics you can open an existing folder and and and show off a great um solution Explorer and get you going you can create your own net project you can launch and uh takes you to the documentation on how to run and debug and test and then straight to the document ation um for how to use uh c devkit um in um in in the vs code docs and so getting started is really that easy as if you see here I'm in the Explorer tab I can just click on there's a new button that'll show Once you have C devkit to create a net project and this is going to bring up a list of a curated list of of projects that you can create and now C devkit is intended for the web-based cloud native uh libraries um and and Council apps and then of course obviously test projects um and so I can go ahead and create a a Blazer server app it's going to ask me where do you want to put it put it in my rebos folder and then it's going to ask you what you want to call it always slower when I'm trying to demo right I'm just going to go ahead with blazer app one um and so in the background then it's going to create that app um and then it's going once that's up it's going to bring it up in the normal explorer that you're used to with with Visual Studio code um and in the background it's going to start activating all the extensions to make sure that everything's working and once everything gets loaded this new solution Explorer pops up here um and and all the magic starts to happen from from there um here I've got a a running app um and so once everything has has is loaded um I can F5 um and it's gonna go through and oh um I select the C as my debugger um and then it's going to build my project launch it of course I'm sharing my screen I don't think you're cutting out a little bit see it just done building it's gonna start to start playing around with my app just like that always when I build why is that right the demo guys are like nah not today but um that is really cool to see how much easier it is specifically when it comes to just attaching to bugger I remember before c devkit you had to modify like Json launch uh file and all this that didn't always work and it would be a real pain so yeah that's really cool to see also the um the solution Explorer that's a familiar name for uh the audience who's probably pretty well versed in Visual Studio because of the show but um can you tell us a little bit more about that and what's going on here that's perfect I'm going to hand it over to to to show off some of the great things and talk about the solution Explorer cool and actually oh say before we do that we do have yeah many questions in chat thanks for all of the great questions so first up on the questions of different projects being supported does devkit support. Net Framework especially for non SDK projects so oh did you want to take that one Wendy I can I can answer that or you can it's up to you um okay so so um C dev kit does allow for you to work with your NET Framework projects but there's a little trick that you have to do it's not going to the solution Explorer will not load the integration with the test Explorer will not happen you have to there's when you try to load a non SDK style product project it's going to pop up a toast that says hey you're using an unsupported project we highly recommend you upgrade it um but if you can't you can set and use the C extension so once you click use C extension it's going to ask you to reload um and then it's going to the the C extension in the background can handle and still give you all your intellisense and and the coloring and all of the great things that you're used to but the C devkit features will be will be disabled for for those projects gotcha and then question number two going back to the subscription question do you need a visual studio subscription to use C dev kit so visual studio subscription is is um part of the license for C devkit now community and open source is all free um and so the only people who have to pay for anything or those that are using it for those um companies of larger than five people you can have a pro license or an an Enterprise license for visual studio and be able to take advantage of all of these great things yeah so you know if you're using uh vs Community already then you're golden you you have an account you're ready to go just log in and then last question do custom templates also show on the menu when you click create new project in C dekit uh not today yeah so not yet yeah so what we have in C devkit today for new project is a kind of uh it's it's essentially a hardcoded list of templates which are available uh but you know we are working on enhancing the support for new project and new item and uh we're hoping in the future we'll be able to show custom templates there just like we do in Visual Studio but it might take a while for us to get there um I think before that we'll add support for customizing the parameters during the new project flow and and then slowly start expanding the kind of breath of the the features here yeah awesome so what we want to do is listen to you all and at the near the end I'm going to show how you can submit feedback and and um what's important to you please submit feed feedback and and product enhancements and upvote things on on a repo which I'll show at the near the end as well um and so if we hear that that um custom templates is is more important than some of the other things you we will pay attention and prioritize based on the feedback that we're hearing from customers great cool so said it sounds like you're up to talk about stuff I am up yeah that's right my turn let's go and switch the uh the screen there and then we'll get started with the demo here all right so now you can see my screen so now uh what I've done is I've basically just opened an empty folder here this is the regular vs code Explorer so we can see there's no kind of files or folders uh there so let's go and get started by creating a new project uh hold on a second I clicked the wrong button contrl shift p all right so new project here and I think Wendy showed you how you can do that from the solution Explorer but the gesture to get to the command pallet is control shift p we'll keep it uh very simple here we'll create a console app and then I'll go ahead and give this a name when you do that with an uh when solution Explorer is not open it does have a small kind of delay there um so we'll say my console and then we'll choose the default directory if you wanted to kind of customize that directory you can also do that with this option here but we're going to take the defaults for this one can see mind zooming in just a little little bit on vs code as a whole you can just hit Control Plus sure no problem perfect yeah that's great okay great thank you um so yeah now we can see that you know the project was successfully created and it also did create a solution file for me as well so now let's go and take a look I'll go and kind of minimize that one we'll kind of work with the solution Explorer here so I've got my my solution as well as my project and then my file here so let's goad and add a solution folder to this so we'll see shared then we'll add this for our kind of class libraries I showed you how we can do control shift p to get to the command palet and create a new project another alternative is to actually just kind of click new project in the solution Explorer you can either do that on a solution folder or the solution itself uh this one for the solution itself all right we'll go Ahad and create a new project we'll do a library here class Library we'll create like a shared kind of class Library there uh and it does pick up on that that path here that we clicked on so that's the node that I clicked on in the solution Explorer um I'll call this shared lib and then once again I'll go and take that default directory which was the shared folder there all right so now the the project has been created here it's created a class 1. Cs and I'm just going to go ahead and delete this folder this file here so I'll get rid of that one and then we'll add a new file here so here I'll click the plus button um on the project where I'm trying to add this file to and then we get our list of item templates here and and this is also a hardcoded list right now but you know once again just like projects we can also expand that in the future all right I'll go and create my class here let's create a contact class here uh it's going to be a very kind of basic demo here um okay let's add a couple properties here so I'll say string first name uh and I think after I did the zooming this got pretty uh let me just make my fonts a little bit smaller here this is like huge really crazy after I did the zooming in to vs code in general here um and I don't know if you noticed but for those that are are not that familiar with with vs code um you can use you know the same kind of Snippets that were available in Visual Studio most of those work in vs code as well so I'm using the prop one here um so those are called Snippets and and visual studio and I forget what they're called in um BS code there okay let me create a um we'll do a full name here as well so we'll say get and then this is going to return uh first name and then last name and then boom okay so that should be good um yeah sure all right we got some kind of warnings here let's get rid of These Warnings here so let's go and do that this is another another cool trick works in like most editors and idees you can you can highlight some code and then control and then Mouse drag I don't know if you know that but wow when I learn I know that that's awesome when I learned that like 15 years ago man that saved me so much time but anyway that works PS too yeah yeah it works in the vast majority of editors and idees yeah including Visual Studio there okay so now I've got my contact class here so what I'll do is I want to go ahead and create a project reference here to the to the class Library so I will right click on my console and then say add project reference it will show me the projects which are currently loaded in the solution here so I've got that shared lip I'll go and click enter on that one and then I should have expanded that node so um now that I've added that um that project reference I will see the project node under dependencies and then I can see that shared lib if there's no project reference you just won't see that node there basically so that's how that works and currently we don't have any functionality in this node here but we'll add some functionality there later on all right let me go back to my let me go to my program.cs and then we'll go and kind of modify this a little bit so let's goe and use that contact uh contact equals a new contact and then notice it will add me the using statement automatically um so that's pretty handy going and do this uh last name and then we'll also just take care of this one real quick as well we're just going to update this hello world to where it's going to print out that full name there for us okay contact. full name and I think that's right okay great and uh if you're new to C devkit whenever you try to like do a debugging session or you're trying to run your app make sure you've got a CS file loaded up here um and then pick the C option here so I'll go ah and pick that and then we should see it say hello and then my name uh if all goes well okay hold on a second is that that extra squiggly here hold on a second so let me let's get rid of that is there an extra squiggle over here no all right so I got something going on over here um hold on I just can't see anything okay here it is all right did I mess that up is that correct now there it is all right so that's fine I never remember where to put that semicolon yeah I know that all right there we go all right let's try this all right so this should say hello and then my name where's the uh here it is okay all right so there it is hello say hashimi so yeah that was great and then um Let me let me show some quick kind of debugging features here too I guess real quick um before you do um transition over to the bugging stuff uh real quick on the solution Explorer so by default when you open up vs code you get like the work like the workspace where you can do all of your files but really what's the main difference between the solution Explorer and that default window why should somebody decide to take a look at solution Explorer yeah sure that's a great uh question there so yeah so the difference between solution Explorer and the regular Explorer here let's goad and open up the regular Explorer so the regular Explorer is really just a file is really just a folder view here so uh whatever I see whatever I see in the windows Explorer is what I'm going to see here and I'll have that same structure right so um if I contrast that over here so now what I don't so let me kind of make this to where we can see it a little bit so I created this solution folder that's called shared well yeah so so now um everything's kind of reflected here so it depends right so uh if your solution is set up to where your folder Your solution folders are real folders then you'll get a similar kind of layout there uh um but here let's take a look at this right when I expand that shared and shared lib folder I see Ben and obj and the and the the the file explorer but I don't see those in my solution Explorer here right so that's one difference is you know for the files that you're likely to not directly interact with or directly edit inside this editor uh those will not appear in the solution Explorer there and then um another difference is the uh the structure here right so let me make that one smaller again so things like let's say you know the dependencies right like you know what are the analyzers that I've currently got connected to this project and what framework or Frameworks is it targeting and then the references you know things like the project reference as well as the nougat reference those sorts of things so those are different and then um there's also specific gestures here uh that's enabled on the solution explorer that are not not available directly through the the Explorer here like you know for example um adding the project reference right or adding the solution folder uh those are those are some examples of that um but it's really like a preference thing right you know like let's say if you're used to using visual studio and then with a solution explorer that shows you the projects and and how your your solution is laid out then then a solution that Explorer um you know might be very helpful for you right but but let's say you know if you've been using visual studio code for years and and you're used to the Explorer view here you can do the vast majority of your work without even doing anything in solution Explorer here right like right um for example I can close that and then I can do everything that I need right I can create a new project so I do control shift p I create a new project here let's add let's do a uh we'll just do like a web app or something right let's just do a regular kind of web app here uh yeah web app one so it's just that different you know whatever the preference is right so if you like working with solution Explorer work with solution Explorer if you like working with the file explorer use the file explorer but you same time if you want yeah yeah and then both at the same time too and then but know that you know solution Explorer is doing things behind the scenes to kind of support everything that you're doing there right like yeah you know when I added my web application one even though I wasn't interacting with solution Explorer I was interacting with the Explorer and the command pallet um the project was created and then added to the solution right so so what's great about this is you know if you're working with colleagues and and let's say you know you use Visual Studio code but some of your colleagues use Visual Studio you know you can for the most part pretty much ignore the solution Explorer if you want and keep working the same way that you you've been for years right so we're trying to meet meet users where they're at and you know some some users that want to try out Visual Studio code they they've told us hey you know I really need a solution Explorer type of functionality there so that's why we're bringing that but you know the file the the vanilla Visual Studio code file explorer is is great as well and you can do a lot of things there too um so yeah so I think that's the kind of high level difference there yeah yeah yeah that makes total sense I think I I love the solution Explorer because it does streamline and filter out a lot of these files that I don't always care about when I'm just interacting with my projects but yeah there might be some cases where I want to use the um the default workspace whether it's because I want to manually edit a CS page file easily or for whatever reason so yeah I think having both is great and also before you go into debugging again got a little piece of feedback we need to view the file and folder icons I know you can see them when you hover over um existing files that you've got but I think it would be cool you could have that docked to some yeah we we should we we we do we should have icons over here yeah so we got the uh we we should be using the regular vs code icons here for these files here so I got the C file there I got the the little Json one here and then the the more generic one there as well so I think we do have um if there's any particular file or folder we don't folder icons but I don't know if that's a thing in is that a thing in vs code folder icons no I don't think so but um if there's any particular file that you feel like is not showing you the correct icon uh please do let us know about that and we are using the visual studio code icons here um not the visual studio icons so so that is something to keep in mind there so yeah yeah and then when when Wendy gets back to the feedback area it'd be great to submit a feedback if you're seeing a file that doesn't have an icon there that that should have an icon yeah awesome any other was there any other questions from the chat Leslie uh no further questions your honor okay great all right let's do it then so let's kind of keep going here so I just I just added a little kind of loop over here so I can do a little bit of debugging real quick and uh and I'm not like a debugging and vs code expert here but I'm going to do my best bet I'm going to do my best try here um so yeah I just added a little Loop here so that way we've got some additional code to kind of work with here um I I put my mouse here and then I just clicked F9 right to create that break point just like you would do in Visual Studio yeah also just like Visual Studio I want to point out the break points window that's in that run and de bug pane which is a really nice place to manage all your break points in one spot to that oh it's under um the run in debug okay got you yeah right yep yep yep yeah under break points and that you know what this is something I I put a feedback on it you can't modify the size of that one but yeah no I wish you could um expand that up too yeah I was trying just for demo purposes I wanted to just bring it up here so people could see it better we don't create feat for demos though I guess but anyways all right so let me go and kind of continue so uh yeah what I mentioned before was you can either use the shortcut F9 or you can right click and add a breako uh or a conditional break point as well all right so I go and add a break point to that one uh let's go on F5 that thing so yeah we'll pick my console so now uh this is also another difference here that we didn't see before right so last time when I did an F5 um I didn't get prompted for what kind of project to run here and the reason is because uh C devkit figured out that we only have one runnable project here right so I had my I had my shared Library project which is not runnable and then I had my console project which is runnable so it just automatically ran the the runnable project um after adding the web application project now I've got more than one runnable project so the C devkit will goad and pause here and then and then go and ask you to pick a project to run so I'll pick my console and then it's going to go ahead and run that with the debugger and then this breakpoint should be hit here pretty soon all right now so now we've got the breakpoint hit Okay so let's give a little kind of Basics about debugging here in Visual Studio code so um so after I did the the F5 it started running my application and then attached a debugger and then it hit the breakpoint here so this is what it looks like when a breakpoint is hit and it's got this little gold kind of Arrow around it right a regular breakpoint looks just like that all right so now here you've got this additional toolbar so here is where you're going to do your debugging actions here right like I can click continue and continue means the same thing it does in Visual Studio it means go and keep running my app and here the count is at two let me continue and then it'll hit the break point again and then I'm back and now I'm up to three you can also step over and a lot of the keyboard shortcuts you'll notice are the same as visual studio um in some cases they're not exactly the same but for the for the most part A lot of the shortcuts will be the same uh step over step into step out uh restart and then stop the debugger there yep and then if you wanted to if you wanted your app to continue R running you just wanted to detach the bugger then you'll disconnect here also I want to give a shout out to the other kinds of break points that you can create here like you're in a while loop let's say you wanted to get to iteration 72 which would take forever if you just hit step one but yeah you can just um make a conditional break point which is pretty nice yeah so you can say 17 let's try it is that how it works I you know I never tried this so let's see if that works is at three and now my count is at 17 Co all right so there's the conditional break point there and what about locko is that does it just kind of send a message to the console there yeah that does it works as a print statement without having to modify your code to write the okay yeah great okay great yeah I haven't used that you know there's so many features I haven't used because we're always kind of rolling out new features here um so yeah while we're on debugging let's go ahead and kind of take a look at some of the support that you have here so this is the breakpoint window that Wendy and Leslie were talking about earlier so here's how you can view and manage all of your breakpoints if you want to edit that breakpoint or delete that breakpoint um or create new breakpoints um for me it's easier to just do it in the code but you know whatever your preferences there and then inside the locals window so this is also very similar to the locals window and visual studio it shows you the the variables that are local to this let me see if I can step out so I will step out oh I so okay anyways I clicked the wrong button there um but anyways let's do that one more time all right so let's go and F5 it again my console oh while that's building real quick question in the chat is it possible to run multiple projects at once to do debugging I don't believe it is currently but that is a great piece of feedback because that is something that you can do in um vs I let me do a thread Dot sleep here all right we'll try it out so I'll save that you I thought you could do more than one all right so now this is sleeping or it's it's it's running now it's sleeping I'll have five again oh I can't me go back here can I not run it again control shift no okay yeah anyways guess not um there are ways to configure that but you'll have to play around with your vs code settings file I believe um but yeah you know if that's something that people are kind of very interested in and if you want us to streamline the multi-project start scenario that'd be a great piece a great piece of feedback for us to receive um a hack I guess is if you want you can always run your app from the terminal um and then and I think there's kind of two hacks here one is to run one of the apps on the terminal and then debug the project that you want um you should also be able to attach um you should also be able to attach but let me see if I can um let me just try it one time real quick yeah so let me see if I can go here yeah see okay hold on a second so now it's running right so now I can do it again right uh oh no that's the deer okay yeah I guess not yeah okay um yeah let's pick that one okay so now if I run does that work yeah okay I think it was yeah it might be possible I'm not totally sure like I said I'm I'm not a debugging expert here so I don't know everything that's possible here but I wouldn't be surprised if he can get more than one to and it looked like I I did have more than one running there so I think it is possible we just don't have the right people here to kind of talk through that here yeah it it requires taking and setting up your own um launch. Json file um and not using the the automatic connected one which it only allows for you to select one at a time but um using your own launch. Json file you can you can set that up to have it launch more than one at a time I think I just figured it out so let me um me go back here I'll stop that one all right so what I'll do is I will go ahead and run let me go back to the beginning here I'll run the web app first because that one's just going to keep running forever right so I will F5 this uh it just picked my console app again okay that's fine let's let's do it another way here so what I'll do is I'll go to the debugger here and then I'll pick C web app here and then run and then this is going to launch my web app and it launched it on a different screen um but we can I'll bring it into the page here so we can see that that's working so there's my web app and then I can go here and say C my console and then click the green play button and now let's go back to and I can still see that this one's still working right so so there it is so now we've got you um that's it and did that one stop on 17 let's see 11 12 it should stop on 17 I think 17 yeah yeah there we go so that's the way that you would do it um in like a one-off kind of scenario but then Wendy was mentioning that you can kind of handcraft to launch settings. Json to kind of duplicate that uh as as needed there yeah okay great so that's what we had what else do we have here for today I did the contact I did the right line um that I think let's let's go back to the solution Explorer and see what else uh did I miss over here uh we did I think one thing that we didn't talk about was file nesting so that's also another difference is the file nesting so in the file explorer there's no nesting here here uh every just the files just kind of show up there let me go to the web app one for example app settings. development. Json app settings. Json whereas in the solution Explorer I do get that nesting nesting experience here um and the nesting is very kind of the nesting support is very basic right now but we will kind of update that nesting support to be more consistent with Visual Studio itself and let's take a look I think that is really the most of it but um for users that are there you know there's different types of users out there right there's there's like the keyboard there's like the the mouse kind of driven developers there who like to use the mouse and and click on buttons and gestures and for those types of developers we have things like the context menu uh and then what I can't baby to do it for you um so we've got the gestures here on the context menu and then for the developers that don't like to use their Mouse they're just kind of keyboard uh oriented you know we've got the support from the command pallet there so yeah so I think that's kind of a general overview of the solution Explorer support here and uh yeah any questions or comments uh yeah we got a couple questions so uh let's see let's start with oh here here we go hot reload do we have plans to add we currently have it under like an experimental version right uh yeah yeah that's right so yeah we we've heard a lot about hot reload that's an area that we are kind of looking at and seeing what can we bring uh we don't have any news to share um with specific dates or anything yet but uh but yeah that is a that is a highly requested feature that we are that we are looking at now awesome uh let's see another question that we had this is kind of more related to Maui but are there options for visual design like in Visual Studio using Maui that's a great question um you know I think uh when when I look at the visual studio code users you know they're more kind of code oriented there as opposed to kind of designer oriented right so I think you know most of our kind of efforts for designer are going into Visual Studio itself as opposed to vs code but you know that's that's another thing we would have to you know if we if we did receive a good amount of feedback then that would be an area that we would look at but we're not doing anything with respect to designers and C devkit today gotcha all right um other questions before we jump into I think testing which Wendy I'm sure youve got a lot to say there uh is using C devkit the alternate way to develop without vs for Mac which has now been deprecated um yeah you know I think it's an alternative right um so yeah if you're on Mac OS and you know if you've been using visual studio for Mac um then you know I think C defate is a pretty good home right um with that being said it's not exactly the same right you know visual studio for MAAC is an IDE Visual Studio code is an editor uh but you know we're trying to bring the same kind of features and functionality uh to to both of these kind of products here right so whatever you are able to do in visual studio for Mac should be possible with Visual Studio code and that's another area where we're going to be relying pretty heavily on user feedback and you know if you are able to use visual studio for mac and you're having hard times with certain things in vs code please do let us know about that and and and then we'll have to prioritize the work as as the feedback comes in cool yeah just to add a little bit to that we are over the the next several months as we're approaching that that app date for visual studio for Mac we're continually working on making sure that we have the ability for those loyal customers to continue to work uh work successfully on their Macs in using C dev kit and so as Sayad said please if you find if you run into issues while you're using your Mac um please please please submit feedback so that we know and our and can can really prioritize those things that are important awesome all right cool so shall we start talking about testing awesome yeah testing and I wanted to to just show a couple of other things so if we can switch over to my screen there you go awesome so um some of the great things that the C extension offers um there's you know a ton of different go to definition go to implementation find all references names refactorings all the different things that you're used to are all available with c devkit and the C extension um so I can you know click here and this is going to take me over to that weather forecast class and so I can see right away uh jumping right to things um without having to hunt and find which folder was that in and all of the different things and if I don't like the name of uh this I can you know click to rename and I can you know try to call it descript deson if I do that shift enter it's going to show me all the places that it needs to make changes to do that rename so it's going to find where I've refer all the references to that summary field um and and allow for me to then apply those changes across all of them and um and so it's Frozen um it's got the the streamyard thing is right over the top of it and so oh yeah not able the IDE right so lots of cool things there um that that the the C extension provides and the the Comforts of visual studio um as you saw a lot of the intellisense um as as Sayad was talking you the Stars the the completions all of the different um uh things that it provides are are are pretty cool jumping over to testing the um the test Explorer integration that c devkit provides with Visual Studio code allows for it to visualize all of your tests and so instead of having to go into the terminal and net testing you can you can see all of your tests that are available here you can run all you can run some um the you can jump directly to the test so again I don't have to sorry I've done some modifications since this one so it's not finding it I have to rebuild to get all the tests uh back in place it does rely upon the dlls being available and the and the builds being there for you and so um when you write all your tests it won't automatically appear in that test window you do have to perform a build first um and then it can then ReDiscover and and find all the tests and and run them successfully um so here I've got a failing one and so then I don't know why that's not working of course that I'm on a pre-release version of of both C devkit and [Music] um and visual studio code so it's a fun cocktail I I have uh I have yeah I I've left things wide open here to the demos oh go but so um you can it provides you with uh the information directly in line um so you can make some adjustments and of course is true false is never is true um but sometimes it's not that easy so in in here you can you can start a debug session um which runs the test um as as before but it will place a break point right where that failure is so you can see uh what's happening in the background um and it'll stop right there and you can see where all all the variables are and everything is is happening where where that uh breakpoint hits which can help you really understand what's going on with your tests yeah that's awesome and then also that comes with additional command palet commands to choose from related to testing too right exactly so yeah the um test um for me if I do test plural yeah so all of these These are visual studio code commands so they're not specific to C dive kits if you're used to running tests in other languages the the same uh commands are are available now um when you're doing your c editing sweet and I think what's cool about that is because the test Explorer existed before c devkit right but um yeah so we didn't we didn't just copy paste the visual studio experience and just call it a day into VSS code which is nice it's been organically integrated with the VSS code experience and one of the really cool things that I love about Visual Studio codes uh test Explorer is it provides this history of your test results so sometimes you're working through and you're continually running your tests as you're making changes to your code and then all of a sudden one of your test starts failing and you can see that history do you know okay that's when I made this change when when everything started failing um which is hugely beneficial and helpful um when you're doing things which awesome that was really nice and I also like just the ability to be able to run and debug all of these in line in the editor like the little green icons that show up they recognize that's awesome yes yes and it's said I'm using a pre-release demo build and it's not showing up right now but there's usually little uh buttons right here AR right now L GA release version y'all there little green icons that should be appearing by they were there this morning sweet yep Demag gods are figle creatures yes yeah so um the other thing I wanted to show we mentioned like your feedback is the most important the best way for you to provide feedback is going to The Help menu and Reporting an issue here if if it's a bug report select bug report if it's a enhancement request select feature request select an extension and then C devkit and this will submit an issue directly to our GitHub repo um and uh which um I believe we're going to paste the link to the GitHub repo in the chat uh all of the issues there are open public so you can go through and provide more information about if you if you see something that somebody an issue that somebody else is having um you can uh provide your details as well that's the way of up voting is to comment if it's just as simple as you know I'm having the exact same problem that lets us know that it's happening if you could provide more details like if it's on Mac Linux or Windows um which versions of the extensions you're using if you submit through VSS code through that bug report it's going to provide us with all of that information automatically which is why um we highly recommend you go through that so that we can get that um that information uh to to better help us troubleshoot um the issues that you're having but when if you're up voting you're commenting on somebody else's that you're having the same problem please include that information to help us get started um and and have a better idea of what's going on awesome and uh in addition to that I guess on the topic of feedback I did have another question in the chat so does the C dev kit bring the same let me show you how to improve your code features that Visual Studio has um I'm assuming that's kind of referring to stuff like co-pilot chat which does exist in BS code and is compatible with c devkit and then other kinds of additional insights that uh features are starting to add in BS land yeah so there are a lot of the the um great analyzers um in uh light bulb and and all of that so if I had um let me just bring up a different file um if I had here um like an unnecessary using statement um the the light bulb is going to come up and it's gonna you know give you that oh you know this is unnecessary you can remove it all of those do all of the different analyzers that you have from rosin and Razer are going to are also available here in C devkit to help you make your code better if you're using um you an old way of doing things in C all of those um problems um or or suggestions um are available uh through through us um as Leslie said also uh if you are a GitHub co-pilot subscriber uh the GitHub co-pilot uh chat and go regular co-pilot extensions work great with c devkit and so you can continue cool and then another question about hot reload can you show us where where to go to enable hot reload because it's currently available as more of a preview feature so it's not yeah so hot reload is is in preview we are working as fast as we can um on on getting that it's in C right I usually just go to the settings that's in the bottom left hand corner at the window it works too we do it yeah so um so uh here uh you can turn on hot reload to make it available um and so it's off by default right now so you'd have to come in to turn it on um and so then if you go to um to debug your um am I in a web app I don't even know yes I think I am um so if I go to debug um usually the little hot reload icon will appear again demo gods are not working for me today but there's a little there's a little icon that usually appears right between here that's like the flame um that's the hot reload um in there's a hot reload um output that will appear um in in one of the outputs and for some reason it's not turning on for me today but you can see it'll tell you reach change you make it'll say if it's hot reload eligible or it'll tell you if you need to restart in order to make it uh to make it work um again still in preview so um we're still working on some of the Kinks and and bugs on that one um to get it to work successfully but it is it is coming along and should be available soon cool oh real quick did you enable the hot reload setting that's below uh I think hot reload verbosity there's like another one there you go because that I think that's the one that you want to actually miss you might have to restart um y I love to restart the cool thing you can so many different ways to start there the little buttons you know all the different ways that sad was showing you that you can you can run and debug from pretty much anywhere in vs code theand pet has all of it too yeah and there it is yay cool as for whether it works or not right now is up in the air Shing your feedback for is U is all about and also on the topic of feedback um I think the reason why you should specifically submit your feedback through VSS code instead of just um the repo which we did link to if that's what you want to do on a direct level is that if you do it through vs code You by default get your system info shared with us so that decreases the amount of time that it will take for both sides to get what we what we want we we ultimately want to help address the issue that you're experiencing and you want to make sure the issue gets addressed obviously so the less time we have to spend doing a back and forth trying to get any additional info from you in order to accomplish that task the better so and and another thing I wanted to add there is you know I know that the the uh vs code Marketplace allows for you to to do reviews reviews are great we love them but they don't give us the opportunity to have the conversation back and forth with you and so if you do have feedback submitting it through that feedback mechanism so that we can have that conversation with you over the repo and make sure that you're Pro F get we can see from from the initial report all the way through till we've got but bits in on your system that are finally working and get that closure all the way through we we love that back and forth with you and we'd love that that better than than the the reviews awesome and where can folks go to learn more about C devk and get started with their own C journey and Bs code so in the um Marketplace the C devkit uh provides all the latest information there in the in the read me let me just close this so you can see more um there there's a lot of really good information including links to our getting started um and the the vs code docs for for C devkit are all available there um here uh in uh in the read me for in the marketplace yep yeah if you haven't been to specifically the vs code docs in the past couple months or prior to devkit existing you should go check them out again they have been updated like a lot for the C language area specifically and that will is a great resource to get you started from everything to project management all the way up to testing so go check it out brand new documentation all right cool well um if no one has anything else Sayad and Wendy thank you so much for coming on the show this is really exciting I'm excited to see devkit finally be um available in general release mode that's really exciting that's a long time coming yeah thank you so much for having us this was this was great we love sharing all the hard work that the team has done to get this far and we really want everybody's feedback so please keep it coming um so that we can keep making this better yep and if you want even more content on C devkit uh I don't know net com is coming knows cool so until then thank you so much everyone thanks to everyone in the chat thanks for all the awesome questions and until next time happy coding y'all thank you [Music]
Info
Channel: Microsoft Visual Studio
Views: 3,814
Rating: undefined out of 5
Keywords: csharp, devkit, vscode
Id: 7NjTIBezZl0
Channel Id: undefined
Length: 60min 4sec (3604 seconds)
Published: Fri Oct 13 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.