How to debug in C#?

Asked

Viewed 584 times

2

How to debug in C# taking as reference the simple form of PHP that is usually used var_dump or print_r?

I have a C# object but I don’t know how to know what’s in its structure.

1 answer

2


The first 3 options shown here is necessary to add a break point in your code to view the structure of objeto:

1. After the IDE pause the code on Break Point, click on the tab Immediate Windows, typhoon ? and the objeto/variável, etc and press ENTER

inserir a descrição da imagem aqui

2. Click on the tab Local and navigate the objetos/variáveis,etc.

inserir a descrição da imagem aqui

3. Mouse Over about the object

inserir a descrição da imagem aqui

4. The tab Output shows, among other information, the result of the command WriteLine, ex: Debug.WriteLine(objeto.propriedade);, in this case it is not necessary Break Point

Visual Studio IDE User Guide

Browser other questions tagged

You are not signed in. Login or sign up in order to post.