[00:00:06] Thanks Mads and thank you everyone for [00:00:08] joining the session of what's new in [00:00:10] Visual Studio Diagnostics. [00:00:12] My name is Harshida Hole. I'm a product [00:00:14] manager in Visual Studio. I've been [00:00:16] focusing on the diagnostic experiences [00:00:18] including debugging and profiling from [00:00:20] past few years. [00:00:22] So in this session today I'm going to be [00:00:23] sharing what my team has been working on [00:00:26] and the new features, the new [00:00:28] experiences we are bringing soon. [00:00:30] Before I jump into demos I wanted to [00:00:32] share a little bit of a thinking behind [00:00:35] our experiences and the new features. [00:00:38] So we have been trying to build the new [00:00:41] debugging experiences and profiling [00:00:43] experiences to meet our developers where [00:00:45] they need us. [00:00:46] So we all know with AI the way we [00:00:49] develop, the way we debug, profile or [00:00:51] even review our code has been changing a [00:00:54] lot [00:00:55] and the workflow you guys have might be [00:00:57] completely different than the workflow I [00:00:59] have. [00:01:00] And that's why we wanted to build in the [00:01:01] tools that meet the developers where [00:01:04] they need us and they don't need to [00:01:05] change their their workflow to use the [00:01:07] Visual Studio diagnostic tooling. [00:01:10] When I say that there are three [00:01:12] different scenarios I could categorize [00:01:14] the new features we are bringing in. [00:01:16] So if you are someone who actually likes [00:01:20] to use Visual Studio's agentic workflow [00:01:22] from start to end, from building your [00:01:24] code, debugging, profiling, we are [00:01:26] actually building some new tooling for [00:01:28] you so you could take the full advantage [00:01:30] of that. [00:01:31] Or if you're someone who likes to [00:01:33] explore different AI clients or new AI [00:01:36] tooling like Copilot CLI, [00:01:39] even the Copilot app or even VS Code [00:01:43] and want to bring the Visual Studio in [00:01:45] connection with that to have that [00:01:46] connected diagnostic experience, we have [00:01:49] something for you too where you could [00:01:50] use Visual Studio with another client. [00:01:53] Or if you're someone who still uses [00:01:55] Visual Studio [00:01:56] manually and need any contextual help [00:01:59] here and there or go go deeper or just [00:02:02] have more analysis. We are also building [00:02:04] some new features, smaller features for [00:02:06] you as well. [00:02:08] So I'll be showing you the demos for all [00:02:10] these three different scenarios. I also [00:02:12] want to mention some of these features [00:02:14] are brand new. Those are not even out [00:02:16] yet, so you guys are the very first to [00:02:18] see those demos. [00:02:20] So the very the first thing I wanted to [00:02:22] talk about is our debugger agent. [00:02:24] So if you know, we have a dedicated [00:02:26] debugger agent which not just reads your [00:02:29] logs, but it actually has a full runtime [00:02:32] context. It has your it understands your [00:02:35] breakpoint, your call stack, your power [00:02:37] stacks, everything that is needed to do [00:02:39] the debugging perfectly. [00:02:41] This debugger agent also has a [00:02:43] thoughtfully curated and curated work [00:02:47] workflow called investigation loop [00:02:49] where you can actually give your bug [00:02:51] URL, your GitHub URL, or your DevOps URL [00:02:54] to explain your bug, and it will help [00:02:57] you resolve that bug. [00:02:58] It will not just resolve or give you [00:03:00] effects, it will actually reproduce [00:03:03] reproduce it, investigate it, actually [00:03:05] correct it, even create hypotheses if [00:03:08] needed, and then verify the verify the [00:03:11] fix all everything in the Visual Studio [00:03:13] right there. [00:03:15] The best part, there are multiple ways [00:03:17] you could use this workflow. So you [00:03:19] could do a manual investigation where [00:03:21] you could actually just verify and [00:03:24] reproduce the bug manually using your [00:03:26] own [00:03:27] judgment, or you could do a test-driven [00:03:30] investigation if you are very [00:03:31] test-focused. The agent will actually [00:03:34] use a existing test suit, even create a [00:03:36] new test if needed, to verify, reproduce [00:03:40] the bug fix it creates. And the best, we [00:03:42] recently added a UI automation in our [00:03:45] latest insiders of Visual Studio, which [00:03:48] is perfect for the UI bugs or the WPF [00:03:50] bugs where the debugger agent will use [00:03:53] UI automation to reproduce, investigate, [00:03:55] and even verify the bug. [00:03:57] Now in the next demo, I'm going to be [00:03:59] showing you a quick [00:04:01] quick way use the UI automation. [00:04:05] Okay. [00:04:06] So here I'm going to be using our all [00:04:09] favorite application called eShop on [00:04:11] Web. I'm running it locally and what I'm [00:04:14] trying to do here is trying to buy this [00:04:16] .NET Blocked Sweatshirt. [00:04:18] Just going to pause it here. [00:04:20] If you notice here whenever I update the [00:04:23] quantity to three, the cost of the item [00:04:26] cost is not exactly matching to the cart [00:04:29] total. So we understand the bug. It's a [00:04:31] pretty simple bug. Purposefully I [00:04:33] selected the simple bug so we could [00:04:35] focus on the workflow and not the bug [00:04:37] complexity. [00:04:39] Now to resolve this bug, what I'm going [00:04:40] to do is I'm going to go back to Visual [00:04:42] Studio and use a debugger agent with UI [00:04:45] automation. [00:04:46] So let's go in the Visual Studio. Okay. [00:04:50] Here in Visual Studio, I'm going to make [00:04:52] sure that the agent have a debugger [00:04:55] agent selected. You could also do that [00:04:57] in the normal agent, but I just want to [00:04:58] make sure always when from debugging [00:05:00] that debugger agent is selected. [00:05:03] You could use any of the model you like [00:05:05] or you could even do the interactive or [00:05:07] autopilot mode if needed. [00:05:09] I'm going to go ahead with the [00:05:10] interactive mode so I can show you a few [00:05:12] things here. [00:05:14] Once this is done, you could place your [00:05:16] bug URL as I said DevOps or GitHub or [00:05:19] explain your bug a little bit in a [00:05:21] detail. [00:05:22] Here I'm just telling the agent that I [00:05:24] have a inconsistency in the price in the [00:05:28] in the cart [00:05:29] and some more details so it can actually [00:05:32] start its investigation. [00:05:34] And from there the debugger agent takes [00:05:36] care of everything. It will actually [00:05:37] just reproduce and verify and fix [00:05:40] everything using the UI automation. [00:05:43] The very first step after this, it's [00:05:45] going to ask me which kind of a style or [00:05:47] which kind of a mode I wanted to go [00:05:48] ahead with as I mentioned before, [00:05:51] a manual or test driven or a UI [00:05:53] automation, you will get a prompt to [00:05:55] select which kind of way you wanted to [00:05:57] go. [00:05:58] So as I said, you could choose whatever [00:06:01] you want. I wanted to show automated UI. [00:06:04] So I'm going to just go ahead and going [00:06:05] to to select that. [00:06:08] Just give a couple of second here again. [00:06:09] Okay. [00:06:10] It's also going to ask me if the agent [00:06:12] wants me to ask before applying the fix. [00:06:14] I have seen this workflow a couple [00:06:16] times, so I'm just going to tell the [00:06:18] agent to go ahead and apply the fix [00:06:19] without asking me. [00:06:21] Now, from here, it's going to do an [00:06:23] investigate few things in the [00:06:25] background, getting gathering some [00:06:27] context it needs to. [00:06:29] As I said, if you do an autopilot, you [00:06:32] won't get those prompts [00:06:34] and usually you will have much more [00:06:35] faster response as well. [00:06:38] Now, the agent actually automatically [00:06:41] launch the application. And here I [00:06:43] wanted to show you how it will actually [00:06:45] reproduce the bug based on the the steps [00:06:48] I I added in the prompt. [00:06:50] So, you you you can see here it added [00:06:52] the correct item. It's also updating the [00:06:55] correct quantity as mentioned in the [00:06:57] prompt and it's checking if the [00:06:59] reproduce bug reproduction is correct or [00:07:01] not. [00:07:02] I'm just going to pause here and show [00:07:04] you in the chat that it's telling me [00:07:06] that [00:07:07] okay, I'm able to reproduce the bug and [00:07:09] now what it's going to do is it's going [00:07:10] to replay the whole thing using the [00:07:12] runtime stage. So, [00:07:14] it might be able to place some break [00:07:16] points if needed to to to to validate [00:07:19] the hypothesis it's creating around the [00:07:21] fix [00:07:22] and [00:07:23] run the whole thing again. So, let's [00:07:25] give it a second to see what it does. [00:07:29] [clears throat] [00:07:31] Okay. So, it's going to replay the whole [00:07:33] thing using the UI automation again. [00:07:36] Again, we saw it actually added the the [00:07:39] correct item, the correct quantity. And [00:07:41] if you notice here, you will also see [00:07:43] that it added a break point to validate [00:07:45] the hypothesis it's creating for the fix [00:07:48] and making sure that particular break [00:07:50] point is setting. It will also delete [00:07:51] the the break points needed [00:07:54] or it added later, so you don't have to [00:07:56] do that. [00:07:57] Once it does that, it's going to go [00:07:59] ahead and apply the fix and verify the [00:08:03] fix as well. [00:08:04] So, I'm just going to fast forward it [00:08:05] here so we could save a little of a [00:08:07] time. [00:08:08] It's also giving me a summary what it [00:08:10] has [00:08:12] find so far, what the issue is and what [00:08:14] the proposed fixes. [00:08:15] As I ask the agent to go ahead and apply [00:08:18] the fix, it's just going to do that. [00:08:20] In just a second, I wanted to show you [00:08:22] one more important thing here. [00:08:24] So we all know we are writing so much [00:08:26] code with AI, so regression of the code [00:08:29] is really possible. [00:08:31] But this particular flow does that [00:08:33] whenever it's adding a new code, [00:08:36] it actually makes sure it's we are not [00:08:38] regressing the previous code. [00:08:40] So [00:08:41] using the existing test [00:08:44] inside the inside your application. [00:08:47] So what it did now is actually applied [00:08:49] the fix, successfully build it and then [00:08:51] it's actually re-running the application [00:08:53] to verify that the fix is added is also [00:08:56] shown in the web application. [00:08:59] So just give it a couple of second. If [00:09:01] you notice here, it's also running all [00:09:03] the regression tests as I mentioned, [00:09:05] which is really important step to make [00:09:06] sure that the new code is not regressing [00:09:09] anything else. [00:09:11] Once it does that, it's going to re-run [00:09:14] the application to verify the fix. [00:09:20] Okay, so it launched the application [00:09:22] again, adding the correct item [00:09:24] and then recreating the repro steps [00:09:28] and making sure the fix it added is [00:09:30] actually really fixed the whole bug or [00:09:33] the issue we described in the start. [00:09:37] Okay, so as you can see, the update cart [00:09:40] total is now correct and the bug is [00:09:42] fixed. [00:09:43] So this is was this was a simple bug, [00:09:45] but we have been testing this with many [00:09:47] other bugs as well and you could see how [00:09:49] you could use a debugger agent with UI [00:09:51] automation specifically for the the web [00:09:54] web application bugs or WPA bugs, so you [00:09:58] don't have to do anything and you could [00:09:59] do a hands-on debugging, hands-free [00:10:01] debugging, sorry. [00:10:03] So this feature is available in our [00:10:05] latest insiders, so please give it a try [00:10:07] and give us a feedback around that. [00:10:10] The next thing I wanted to talk about is [00:10:11] a second scenario I mentioned. So, if [00:10:14] you're someone who really likes to use [00:10:16] different AI tools or different clients, [00:10:19] but also likes to use Visual Studio [00:10:21] maybe for a various reason, you know, [00:10:23] you wanted to use Visual Studio because [00:10:26] it has the best in class debugging and [00:10:27] diagnostics features and profiling [00:10:29] features or you're more familiar with [00:10:31] Visual Studio or you just wanted to see [00:10:33] things visually and visually. You can [00:10:36] bring in Visual Studio along with your [00:10:38] existing client and have that connected [00:10:40] diagnostics experience. [00:10:42] So in the next demo, I'm going to be [00:10:44] starting my performance investigation [00:10:46] from Copilot CLI [00:10:48] and then I'm going to [00:10:50] the use the AHP [00:10:53] to connect the Visual Studio to the [00:10:54] client and then continue my [00:10:56] investigation in Visual Studio. [00:10:58] So let's get into the demo. [00:11:01] Here I have a CLI open. I'm trying to [00:11:04] investigate a open source application [00:11:06] called Sharp Lib Zip. [00:11:08] I noticed some performance related issue [00:11:11] around this particular benchmark. So I'm [00:11:13] giving a simple prompt to the CLI to do [00:11:16] a performance investigation here. [00:11:19] I'm also asking it to just do a static [00:11:21] analysis for now and then go ahead and I [00:11:24] will be going into Visual Studio to dig [00:11:26] much deeper. [00:11:28] So [00:11:29] the [00:11:31] CLI will just go and do some things in [00:11:33] the background and give me a complete [00:11:35] static analysis here. [00:11:36] Just just give a couple of seconds to [00:11:38] the CLI here. [00:11:44] Okay. So it came up with the details [00:11:46] about the particular benchmark. It's [00:11:49] telling me what is the possible issue. [00:11:51] The the grouping could be an problem and [00:11:54] it's also giving me some instructions on [00:11:56] what I could do further with profiling. [00:12:00] Now this particular experience is not [00:12:02] out yet. It is coming soon. [00:12:05] So to connect to Visual Studio, I am [00:12:07] going to be using a prompt called [00:12:09] launch-vs. [00:12:10] I have a plugin added in the CLI. [00:12:13] But when you guys be getting this [00:12:15] experience, it's possible that [00:12:17] connecting to the Visual Studio might [00:12:18] look little different, but it's much [00:12:20] more easier than what I'm showing here. [00:12:22] I'm also using a private build, so a [00:12:24] build for the Visual Studio. So I'm [00:12:25] going to specify the build. You will not [00:12:27] be able You don't need to do that when [00:12:29] you guys have this [00:12:31] experience [00:12:32] to use. [00:12:33] So let's go ahead and launch the Visual [00:12:36] Studio now. [00:12:39] Okay, so as I said, I'm going to be [00:12:40] using a launch VS with a private build. [00:12:43] And as soon as I give the prompt to CLI, [00:12:46] you will see a Visual Studio is [00:12:48] launched. [00:12:49] And the best part, [00:12:51] it has the the right file open, which is [00:12:54] which I'm talking about. [00:12:55] And it has a Copilot chat, which is in [00:12:58] complete complete sync with the with the [00:13:01] CLI chat. [00:13:02] So here you will see both of the chats [00:13:04] are in complete sync. So you now have [00:13:06] these two powerful tools to complete [00:13:09] your investigation or dig deeper into [00:13:11] your investigation. [00:13:13] Here in Visual Studio, I'm going to be [00:13:14] using a profiler agent to go deeper in [00:13:18] the benchmark. I 'm going to ask the [00:13:20] agent to to profile the the particular [00:13:23] benchmark and also asking it to walk me [00:13:25] through the results. [00:13:27] So I'm just going to give a a prompt. [00:13:29] Again, your prompt could just look more [00:13:32] simpler. This is the way I I do the [00:13:34] prompting. [00:13:36] And once I do that, again, the profiler [00:13:38] agent will take care of it. [00:13:40] As I said, this this particular [00:13:42] experience is still work in progress. So [00:13:43] if you have any feedback while you're [00:13:45] looking at the demo, please put that in [00:13:47] the chat or [00:13:49] put that in the DevOps community. [00:13:51] So once I do that, the profiler agent [00:13:54] will take care of from to here. It's [00:13:55] going to run the run the benchmark and [00:13:58] it's going to collect the traces to find [00:14:00] the existing performance. It's going [00:14:03] then going to apply the fix, propose the [00:14:05] fix, apply the fix, and run and collect [00:14:08] the traces again to show me what [00:14:09] improvement or optimization it has done. [00:14:13] So now you will see the agent is [00:14:15] actually just collecting the traces for [00:14:16] the existing benchmark. [00:14:19] From here you could do [00:14:21] anything, right? Like you have a Visual [00:14:23] Studio open. You could go do much deeper [00:14:26] analysis manually. You could look at the [00:14:28] hot part. Whatever you wanted to do and [00:14:30] without breaking your existing workflow [00:14:33] with CLI. [00:14:35] And use the Visual Studio tooling. [00:14:38] So, after the profiler agent ran run it, [00:14:42] it is actually going to go ahead and [00:14:44] apply the fixes. Lot of things are [00:14:46] happening in the background right now, [00:14:47] so you can't really see in the chat. [00:14:49] But it's going to go ahead and apply the [00:14:52] fixes and rerun to collect the traces [00:14:55] and then it will give us give us a [00:14:57] summary on what has been changed. [00:14:59] So, again few things are happening in [00:15:01] the background, applying the changes and [00:15:03] everything. So, let's just give a couple [00:15:05] of second. [00:15:08] So, we'll also see that it's going to [00:15:10] called [00:15:13] a profiler [00:15:14] sub agent in some time because yeah, I [00:15:17] forgot to mention right now I'm in an [00:15:19] normal agent. So, as I said the toolings [00:15:22] works perfectly fine in the normal agent [00:15:25] or in the the specified specific agents [00:15:28] as well. [00:15:31] So, it reran [00:15:33] the traces and it also built it [00:15:35] successfully. [00:15:38] And now it 's going to go ahead and also [00:15:41] show me what it apply what changes has [00:15:44] been applied and what optimization it [00:15:46] has been [00:15:47] able to do. [00:15:48] So, let me just go back and pause for a [00:15:50] second. So, as you can see after the [00:15:53] profiler agent we're able to do some [00:15:56] changes to the code and perform the [00:15:58] improvements. We are able to see almost [00:16:00] 27% of optimization for the .NET 6 and [00:16:06] then [00:16:07] for the other .NET framework we're able [00:16:10] to see the 13% optimization which is a [00:16:12] great optimization. So, this particular [00:16:15] particular [00:16:17] application has been using the older [00:16:18] .NET frameworks here. [00:16:20] Now from here, the possibilities are [00:16:22] endless. So you could continue your [00:16:24] investigation in Visual Studio. You can [00:16:27] go back and forth from CLI to Visual [00:16:29] Studio. I'm going to go ahead in the CLI [00:16:32] and ask to summarize what we just did. [00:16:35] And [00:16:37] you you don't need even have to have the [00:16:39] Visual Studio open. You could just close [00:16:40] your Visual Studio and continue in CLI [00:16:43] like I did. [00:16:44] So just going to go ahead and close it. [00:16:46] I don't want to save it right now. And [00:16:48] in the CLI in parallel, you could see it [00:16:50] actually summarized the whole thing [00:16:52] which we got from Visual Studio. [00:16:54] So now when you're doing more [00:16:56] investigation in CLI, you have more [00:16:59] deeper analysis from Visual Studio [00:17:01] tooling in your CLI so you could [00:17:03] continue that much better. [00:17:05] So [00:17:06] this is still in work in progress. So [00:17:08] let us know if you wanted to see [00:17:10] something different or any any [00:17:12] particular way you wanted to have this [00:17:14] particular connected debugging [00:17:16] experience or profiling experience, [00:17:18] please give us the feedback in the chat. [00:17:21] So this was the second scenario where I [00:17:22] said, you know, when you're using [00:17:25] multiple tooling and you want a Visual [00:17:26] Studio to fit it as an component, you [00:17:28] could do that as well. [00:17:30] Now [00:17:31] there are still some users we have in [00:17:33] Visual Studio who likes to do things [00:17:35] manually or who likes to go and review [00:17:38] their code and do [00:17:40] just a or just need a contextual help [00:17:43] whenever needed. [00:17:44] So for those, we have been adding some [00:17:47] smaller features here and there. [00:17:49] Some of those some of the new features [00:17:51] around that area is [00:17:53] in dumped debugging. [00:17:55] So if you know, we provide a great deep [00:17:58] dump debugging investigation option in [00:18:00] the in the in the debugger, Visual [00:18:02] Studio debugger. [00:18:03] So if you're someone who has to analyze [00:18:05] the dumps, [00:18:07] now you have this new option called [00:18:09] debug with Copilot whenever you open [00:18:11] your dumps in Visual Studio. [00:18:13] So what this does, it will give you a [00:18:15] great starting point to start your [00:18:17] analysis. [00:18:19] Once you click on this, it will open in [00:18:21] the Copilot chat and it will give you a [00:18:23] initial analysis for your dump. So, then [00:18:26] you can go ahead and ask more questions [00:18:28] or just use that analysis to go further [00:18:31] and investigate. [00:18:32] Again, this could be really handy if [00:18:34] you're dealing with dumps regularly. [00:18:36] Another feature, which is my favorite [00:18:39] feature to be very honest, is this perf [00:18:41] tips. So, if you know Visual Studio has [00:18:44] this tiny [00:18:46] blue hyperlink whenever you are [00:18:48] debugging in the editor. If the block of [00:18:51] code you're debugging is slower or has a [00:18:54] performance issue, it will show along [00:18:57] with this hyperlink in the editor next [00:18:59] to the code line. [00:19:01] Now, this perf tips is powerful or is [00:19:04] helpful even without the Copilot, but we [00:19:07] made it more helpful with adding a [00:19:09] Copilot access to this. [00:19:11] Now, when you're debugging and if you [00:19:13] see a perf tip, you also Sorry. [00:19:16] Now, when you're debugging and if you [00:19:17] see a perf tip, you also have an access [00:19:20] to [00:19:21] invoke a profiler agent from but that [00:19:24] particular perf tip, which will again [00:19:25] give you a analysis of what that perf [00:19:28] tip is showing you, why it is slow, and [00:19:30] a possible code fix. So, you can [00:19:32] actually optimize your code as you're [00:19:35] debugging. [00:19:36] And you can even apply that code and use [00:19:38] hot reload, so you don't even have to [00:19:39] stop your debugging session and do [00:19:42] debugging and optimization at the same [00:19:44] time. [00:19:46] So, these were a few of the newer [00:19:48] smaller features which we introduced in [00:19:50] our recent [00:19:51] insiders release. [00:19:53] So, for the end, I just wanted to give a [00:19:56] quick recap what we saw today. So, we [00:19:59] saw an investigation loop in the [00:20:01] debugger agent. So, if you wanted to use [00:20:03] the the agentic workflow in in your in [00:20:05] the debugging and Visual Studio, you [00:20:08] have a perfect way to do that. [00:20:11] If you wanted to connect the Visual [00:20:13] Studio as an component with your [00:20:15] existing workflow to another client, you [00:20:18] could do that as well. [00:20:20] And that works with [00:20:21] Copilot CLI, Copilot app, and VS Code [00:20:24] today, and we are trying to bring in [00:20:25] more clients as well. [00:20:27] And finally, if you just wanted to have [00:20:29] a small contextual help here and there, [00:20:32] we are also working on those features. [00:20:34] So these are some of the features which [00:20:36] which we have been working for, but [00:20:37] there are so much more which we are [00:20:39] actually currently working and will be [00:20:42] bringing soon in the next few releases. [00:20:45] That's all I actually had. Thank you so [00:20:48] much.