Unity Debugging with Visual Studio

Unity Debugging with Visual Studio

Jayanam

3 года назад

30,024 Просмотров

I got some requests on how to use debugging for C# code in Unity projects and Visual Studio so here is an example project with a UI panel in which I show you how to use the debugger and breakpoints.

You can download the free community edition of Visual Studio 2019 here:
https://visualstudio.microsoft.com/de/downloads/

Debugging is essential when developing software and games so that you can find bugs in your scripts.

See my social profiles here:
Instagram: https://www.instagram.com/jayanamgames/
Twitter: https://twitter.com/jayanamgames
Facebook: https://www.facebook.com/jayanamgames
Patreon: https://www.patreon.com/jayanam
Merch Store: https://teespring.com/de/stores/jayanam-gamedev

Production Music courtesy of Epidemic Sound: http://www.epidemicsound.com

Тэги:

#unity_debugging #jayanam #how_to_debug_unity #how_to_debug_unity_scripts #how_to_debug_Unity_c# #How_to_debug_unity_visual_studio #jayanam_unity #game_development #unity3d #unity #unity_breakpoints #c#_breakpoint #c#_debugging_techniques #c#_debugging_unity #unity_debugging_code #visual_studio_2019_c# #visual_studio_debugging #.net_debugging #.net_debugging_tools #programming_unity_in_c# #visual_studio_debugging_unity
Ссылки и html тэги не поддерживаются


Комментарии:

The K-Bros
The K-Bros - 13.09.2020 02:14

Wow that was pretty helpful... Now unity is slightly less of a mystery to me

Ответить
Kingstantin
Kingstantin - 05.02.2023 15:35

Only windows output appears, no call stack or any other windows. Also, the output is completely empty, it doesn't show me anything. What's the issue here?

Ответить
Bob Bobson
Bob Bobson - 26.09.2022 11:02

Short overview:
- You can set breakpoints in your code where the code excecution is halted by clicking the area left of the row number. There you can inspect the state of your variables.
- You can go through your code excecution with F10 (skips methods) and F11 (enters methods).
- In the Locals window you can watch all local and instance variables for your breakpoint.
- In the Watch window you can add single variables to watch them, so you have an overview about points of interest. To add these just mark them and then drag and drop them to the window.
If you don't have one of these windows, just add them by clicking Debug -> Windows, then Locals or Watch

Ответить
Francisco Redondo
Francisco Redondo - 11.02.2022 23:00

Thanks bro!!

Ответить
Cephlin
Cephlin - 22.12.2021 07:10

I'm getting the breakpoint cannot be bound

Ответить
Alejandro Borge
Alejandro Borge - 07.09.2021 05:48

This is stupid it doesn't teach how to set up visual studio to work with unity

Ответить
Makaka Games
Makaka Games - 30.08.2021 22:41

make a video about Unity Debugging process for iOS with Visual Studio for Mac

Ответить
il4w
il4w - 24.05.2021 21:59

Hi once I install the unity tools using visual studio installer modify option and then try to add debug points and debug it isnt actually giving me an option to attach to unity but just simply attach to process. Did I install it incorrectly I already had visual studio 2019 community edition installed.

Ответить
Amal GameDev
Amal GameDev - 16.01.2021 16:08

hi, brother in my vs the locals window, and call stack window is not appearing even after playing the game. only one window called output is visible during the debugging process. can you help me

Ответить
Iandiana_jone
Iandiana_jone - 09.12.2020 01:01

thanks for the vid mate! now able to debug with more ease

Ответить
masonmason22
masonmason22 - 16.09.2020 01:49

Very useful.

Ответить
Soyuz bhattarai
Soyuz bhattarai - 11.09.2020 03:25

Hey, since you do modeling too, can you make toturial videos on how to make the tremor tremor devil fruit's crack?? Its from one piece, Whitebeard uses it

Ответить