Visual Studio (Code)

Shortcuts

  • prop - creates a new property for a class
  • ctor - creates a new constructor
  • cw - creates a new Console.WriteLine() statement
  • try - creates a try-catch statement

To create a new property, type prop, hit twice tab and it creates a property template which you can navegate and override

vstudio 2

Debug in VsCode

Watch a variable

En la pestaña watch se puede introducir el nombre de una variable y al hacer debug mostrará siempre el valor de esta variable.

vstudio-4

Ocurre lo mismo al hacer click derecho sobre una variable en modo debug. Hay una opción Quickwatch para añadir esa variable.

vstudio-5

Go back when debugging

Si te has pasado un breakpoint puedes volver a ejecutarlo arrastrando el punto de ejecucion actual (la linea donde estas actualmente) hasta donde la quieres

vstudio-6

Conditional breakpoints

You may also set conditional breakpoints with right click when setting a breakpoint.

vstudio-7