 Hi, I'm Arturo Núñez. I'm a technical evangelist for Unity, and in this video, we will see how you can debug your games using Visual Studio. I will be using the 2D game kit from the previous video, so if you want to get it, the link will be on the description, and it's also available on the Asset Store. So, notice that I will be using my PC, however, the steps are the same if you're using a Mac. Okay, so I have my project loaded, and as you can see, my code base can grow huge, so we need good tools to find bugs in our programs, and luckily, we have Visual Studio at hand. So, imagine this scenario. Our game designer, level designer, decided to add some extra effects in our game, so she decided to add some bubble rain here. It should be harmless, right? Nobody modified any code, so if I click play, I should be able to play as I was playing before. Now, do you notice some bug? Ellen was way far from the checkpoint, however, something triggered, the untriggered enter to the event. We need a way to find what's going on here. So, without the proper tools, it will be super, super hard, and time-consuming to find what's going on here. So, luckily, again, we have Visual Studio. The only thing I know right now is that it's something related to the untriggered enter to the event. So, I can go to Visual Studio. I can add a breakpoint in that function. So, I narrowed the problem a bit. I will add a breakpoint by right-clicking into the line number nine of my code. So, what does this mean? I'm telling Visual Studio that once the game is executing, if the code reaches this point, to stop the simulation and come back to Visual Studio to analyze what's going on here. So, we have this option called Attach to Unity, which basically attaches this Visual Studio process to the Unity process, but also a super handy option is Attach to Unity and Play. So, this button would allow me to launch Unity within Visual Studio. So, I'm going to click Attach and Play. Visual Studio is telling Unity, wake up. And now, I see the simulation. Now, something stopped and that was super quick. So, something triggered the trigger enter to the message. So, now that I have the breakpoint here, I can inspect and see what's going on here. So, I could say, okay, what's going on here on the game object. I have all the properties, all the values here in Visual Studio, but something is wrong with the collider to the object. So, I'm going to inspect there. I hover over the collision object and I can see, okay, there's something called bubble five with a circle collider to the component that is causing this object to trigger the message. So, I'm going back to Unity and I see that those bubbles were the things that the level designer added. The problem here is that the layers were not correctly set up. So, I need to select my bubble rain object and set the layer to level. I click chess and children. Now, I click play and you see those bubbles are not interfering with the checkpoint and if I get there with Ellen, the checkpoint works again. So, with the proper tools, we can save a lot of time finding those annoying bugs in our code. Another cool thing that comes with Visual Studio is the ability to open the Unity API documentation. To do that, just position the mouse over any Unity related keyword, go to help and click Unity API reference. This will open the Unity API documentation directly within Visual Studio. So, if you want to avoid the problem of opening other programs just to see the Unity documentation, you will have everything handy. With Visual Studio. So, that's the basic of debugging your code using Visual Studio. If you want to learn more about the 2D game kit, please go to the link on the description below. Also below, you will find a link to the previous video on how to edit your code using Visual Studio.