How to Debug Tizen.NET Applications

Reni Mathew

Debugging the Tizen .NET application is available as of Tizen 5.0.

Debugging is a process of recognizing and resolving potential errors from your source code and allowing your source code to perform efficiently under stipulated conditions. To resolve potential errors in your source code, you must identify what went wrong, why it went wrong, and where it went wrong. To simplify this process, available debugger tools navigate you through the code, help you view the execution process, and identify the problems in your source code.

Debugging a Tizen .NET application is the same as debugging a C# application in Visual Studio. This blog explains how to debug a Tizen .NET application.

To debug, you must:

Launch Tizen emulator

Launch an emulator or connect to a target device.

  • In the toolbar, click Launch Tizen Emulator.

Image

Set breakpoint

Breakpoint is an essential feature of the debugging process. It acts as a stop sign. If you need to inspect workflow issues in your program, you can set breakpoints wherever required.

While debugging, the breakpoint indicates to the debugger to stop the program automatically. This helps you inspect your code to verify the variables values, the memory allocation, and the execution sequence.

Click to the left of the line number of your code to set a breakpoint. A red dot appears at the left.

Image

Start the debugger

  • Press F5 to start the debugger.

When you start the debugger, the application program enters debugging mode, and the execution is suspended with all the variables and values in the memory.

The debugger monitors the execution of your code in detail. You can pause the debugger and examine your code systematically to see what happens when each statement is executed.

Step-around code

The breakpoint stops the program so you can hover the mouse over a variable in the current scope of execution to check its value. You can verify whether the variable stores the exact values that you expect it to store.

To verify the values, use the following tool windows:

  • Locals tool window shows variables that are currently in scope.
  • Autos tool window shows the type and current value of the variable used.

Image

These windows appear in the bottom left of Visual Studio while debugging. If they do not appear, select Debug > Windows to open them.

Image

Inspect code

When you go through your code line by line, you will see an arrow Image that shows the statement on which the debugger is paused. The arrow indicates that this statement will be executed next.

While debugging, use the following to examine code line by line:

  • Step Into when you want to debug a method in the current line of code. To step into the code, press F11.
  • Step Over when you do not want to step through the code in detail. To step over the code, press F10.

Image

You can use the same steps to debug a Tizen .NET application. For more information, see Debugging in Visual Studio.

If you have any questions during debugging, use Issues to contact us.