Skip to content
Merged
1,203 changes: 475 additions & 728 deletions docs/application/tizen-studio/tizen-core/tizen-core-cli.md

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion docs/application/toc_all.md
Original file line number Diff line number Diff line change
Expand Up @@ -1167,10 +1167,16 @@
## Visual Studio Code Extension for Tizen
### [Prerequisites](/application/vscode-ext/index.md)
### [Installing Visual Studio Code Extension for Tizen](/application/vscode-ext/Tizen/dotnet.md)
### [Tizen Welcome Page](/application/vscode-ext/tools/welcome-page.md)
### [Tizen Activity Bar](/application/vscode-ext/tools/activity-bar.md)
### Tools
#### [Profiler](/application/vscode-ext/tools/profiler-user-manual.md)
#### [Memory Profiler](/application/vscode-ext/tools/memory-profiler-user-manual.md)
### Tizen
#### [Address Sanitizer](/application/vscode-ext/tools/address-sanitizer-user-manual.md)
#### [Leak Sanitizer](/application/vscode-ext/tools/leak-sanitizer-user-manual.md)
#### [UTC and Code Coverage](/application/vscode-ext/tools/unit-test-code-coverage-user-manual.md)
#### [Dotnet Diagnostics](/application/vscode-ext/tools/diagnostics.md)
#### [Web Assembly](/application/vscode-ext/tools/wasm.md)
#### [Hybrid application development](/application/vscode-ext/Tizen/hybrid.md)
#### [RPK Application Development](/application/vscode-ext/Tizen/rpk.md)
### [Tizen Web](/application/vscode-ext/web.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/application/vscode-ext/Tizen/dotnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To install VS Code Extension for Tizen from the Visual Studio Code Marketplace:
2. In the **Extensions** view's **Search Extensions in Marketplace** field, enter **Tizen**.
3. Locate **Visual Studio Code Extension for Tizen** in the search results and click **Install**.
4. After the installation is complete, activate the extension by clicking **Reload**.
5. Once the extension has been activated, it asks whether you want to use an existing Tizen Baseline SDK installation or install a new one:
5. Once the extension has been activated, it asks whether you want to use an existing Tizen Baseline SDK installation or install a new one. Alternatively, you can use the GUI to perform the same task. Click [here](../tools/welcome-page.md#install-tizen-sdk) to access the GUI.

![Visual Studio Code Marketplace](media/vscode_baselinesdk_exists.png)

Expand Down
131 changes: 47 additions & 84 deletions docs/application/vscode-ext/index.md
Original file line number Diff line number Diff line change
@@ -1,84 +1,47 @@
# Prerequisites of Visual Studio Code Extension for Tizen

Visual Studio Code Extension for Tizen enables you to develop Tizen .NET and Tizen Web applications easily using Visual Studio Code. To work with VS Code Extension for Tizen, your computer must have below prerequisites:

- Supported host platform

VS Code Extension for Tizen supports the following operating systems:

- Windows 10 (64 bit)
- Ubuntu 18.04/20.04 (64 bit)
- macOS 11.4(Big Sur)/12.3(Monterey)

- Required tools

To use VS Code Extension for Tizen, you must install the following tools:

- .NET Core SDK 2.0 or later **for Tizen .NET only**

Download from <https://www.microsoft.com/net/download/>.

- Node.js

Download from <https://nodejs.org>.

- Python 2.7 (only for macOS)

Download from <https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg>.

- Tizen Baseline SDK or Tizen Studio

If neither of these is found, VS Code Extension for Tizen installs the Baseline SDK.

- Microsoft C\# extension for Visual Studio Code **for Tizen .NET only**

Install from the Visual Studio Code Marketplace.

## Emulator requirements

Tizen Emulator for VS Code Extension for Tizen has the same requirements as the emulator in Tizen Studio. To check the detailed hardware and software requirements for Tizen Emulator, see [Emulator Requirements](../tizen-studio/setup/prerequisites.md#emulator).

### Option 1

- Intel&reg; Hardware Acceleration Execution Manager (Intel&reg; HAXM) speeds up the Tizen emulation on Intel-VT-enabled systems. For more information, see [Hardware Accelerated Execution Manager](../tizen-studio/setup/hardware-accelerated-execution-manager.md).

> [!NOTE]
> This option will not be applicable to and will not work on AMD processors.

- Make sure **Hyper-V** is disabled (in Windows 10 or higher):
1. Input **Control Panel** on the **Search** box in Windows 10.

2. Click **Control Panel > Programs and Features > Turn Windows features on or off**.

3. Disable **Hyper-V** and click **OK**.

Additional note: make sure **Virtual Machine Platform** should be disabled as well to use HAXM.

![Disable Hyper-V](media/cs_prerequisite-disable-hyperv.png)

4. Reboot the computer.

### Option 2

- Microsoft's Hyper-V and the Windows Hypervisor Platform (WHPX). Hyper-V is a virtualization feature of Windows that makes it possible to run virtualized computer systems on a physical host computer.

- Make sure **Hyper-V** is enabled (PowerShell in Windows 10 or higher):
1. Check the configuration

> Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online

FeatureName : Microsoft-Hyper-V-All\
DisplayName : Hyper-V\
Description : Provides services and management tools for creating and running virtual machines and their resources.\
RestartRequired : Possible\
State : Disabled\
CustomProperties :

2. Enable Hyper-V & HypervisorPlatform

> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All\
> Enable-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform -All

![Enable Hyper-V](media/cs_prerequisite-enable-hyperv.png)

3. Reboot the computer.
# Prerequisites of Visual Studio Code Extension for Tizen

Visual Studio Code Extension for Tizen enables you to develop Tizen .NET, Tizen Web and Tizen Native applications easily using Visual Studio Code. To work with VS Code Extension for Tizen, your computer must have the following prerequisites:

- Supported host platform
- VS Code with version 1.92.0 and above

VS Code Extension for Tizen supports the following operating systems:

- Windows 10 and above (64 bit)
- Ubuntu 18.04 and above (64 bit)
- macOS 11.4 (Big Sur) / 12.3 (Monterey)

- Required tools:

To use VS Code Extension for Tizen, you must install the following tools:

- .NET Core SDK 6.0 or later **for Tizen .NET only**

Download from <https://www.microsoft.com/net/download/>.

- Python 2.7 (only for macOS)

Download from <https://www.python.org/ftp/python/2.7.18/python-2.7.18-macosx10.9.pkg>.

- Tizen Baseline SDK or Tizen Studio

If neither of these is found, VS Code Extension for Tizen installs the Baseline SDK.

## Emulator Requirements

Tizen Emulator for VS Code Extension for Tizen has the same requirements as the Emulator in Tizen Studio. To check the detailed hardware and software requirements for Tizen Emulator, see [Emulator Requirements](../tizen-studio/setup/prerequisites.md#emulator):

- Intel&reg; Hardware Accelerated Execution Manager (Intel&reg; HAXM) speeds up Tizen Emulation on Intel-VT-enabled systems. For more information, see [Hardware Accelerated Execution Manager](../tizen-studio/setup/hardware-accelerated-execution-manager.md).

- Make sure **Hyper-V** is disabled (in Windows 10 or higher):
1. Input **Control Panel** on the **Search** box in Windows 10.

2. Click **Control Panel > Programs and Features > Turn Windows features on or off**.

3. Disable **Hyper-V** and click **OK**.

![Disable Hyper-V](media/cs_prerequisite-disable-hiperv.png)

4. Reboot the computer.


55 changes: 55 additions & 0 deletions docs/application/vscode-ext/tools/activity-bar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Tizen Activity Bar and Sidebar Feature

The new Tizen Activity Bar and Sidebar features offer a suite of powerful tools and functionalities designed to streamline your workflow, boost productivity, and make coding more intuitive than ever before.

The sidebar contains following features:

- [Welcome Page](#welcome-page)
- [Tizen Tools](#tizen-tools)
- [Actions](#actions)
- [Connected Devices](#connected-devices)
- [Report Platform Bug](#report-platform-bug)

### Welcome Page
- Please refer to the [Welcome Page](welcome-page.md#open-welcome-page) section for an introduction to Tizen Extension for VS Code:

![Activity Bar Contents](media/welcome-page2.png)

### Tizen Tools
- **Tizen Tools** section contains the following tools for Tizen app development:

1. [**Tizen Emulator Manager**](../../tizen-studio/common-tools/emulator.md): Tizen Emulator Manager allows you to create and manage Emulator instances.

2. [**Device Manager**](../../tizen-studio/common-tools/device-manager.md): Device Manager allows you to connect your device and manage it.

3. [**Certificate Manager**](../../tizen-studio/common-tools/certificate-registration.md): Certificate Manager allows you to create and manage certificates.

4. [**Package Manager**](../../tizen-studio/setup/advanced-configuration.md): Package Manager allows you to install, update, and remove Tizen packages.


To **access these tools**, click on the **respective icons** in **Tizen Tools section**. Each tool will open separately, providing you with the necessary functionalities for efficient Tizen app development.

### Actions
- **Actions** section includes various **commands** to streamline your Tizen project workflow:

1. **New Project**: Initiates the creation of a new Tizen project.

2. **Build Project**: Compiles the source code and generates output of your Tizen project.

3. **Run Project**: Executes the built project on a target device or Emulator.

4. **Debug Project**: Launches Tizen project in debug mode, allowing you to set breakpoints and analyze the code execution.

5. **Open Profiler**: Opens Tizen Profiler, which helps in analyzing performance metrics and optimizing your application.

**Click** on the desired **action** to perform the corresponding operation on your Tizen project.

### Connected Devices
- **Connected Devices** section displays a list of all connected Tizen devices. This allows you to select a specific device for running or debugging your Tizen project.

- To **view** the connected devices, **navigate** to the **Connected Devices** section.

### Report Platform Bug
- If you encounter any **issues or bugs** while using Tizen Extension for VS Code, you can use the **Report Platform Bug** feature to report them.

- To report a **bug**, click on the **Report Platform Bug** button and provide the necessary **details** about the issue you encountered.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# To Detect Runtime Memory Error with Address Sanitizer
- The Address Sanitizer is a tool that helps find memory errors in Tizen Native apps. It checks if certain parts of the code might cause memory problems while running. This tool can prevent crashes or bugs during app use. It works by adding extra code during app compilation. If the app doesn't crash with the Address Sanitizer, it means the code is safe from memory issues. The tool can find different types of bugs. The Address Sanitizer tool can detect the following types of bugs:

- Out-of-bounds accesses to heap and stack
- Use-after-free
- Use-after-return (to some extent)
- Double free and invalid free

## To use Address Sanitizer
- In the **Menu**, click on view and select **Command Palette > Tizen: Profile with Memory Errors**.

The profiling instruments the code and compiles the project for the Address Sanitizer. Finally, it launches the application on the connected target or Emulator, as illustrated in the following figure:

![Launch Command](media/launch_asan.png)
<br>

- After the application is launched, run the application scenario you want to test.
- Visual Studio Code shows the profiling result after clicking on the **Stop Profiling** button:

![Stop Profile Button](media/stop_profiling_button.png)
<br>

- Once clicked on the **Stop Profiling** button, the application will crash if there are any errors hence the report will be generated, and if there are no memory errors it will give the message **no error found**, as illustrated in the following figure:

![Asan UI Report](media/failure_report.png)
<br>

## Source file navigation on failure
- When a failure occurs, you can click on the **line number associated with the failure which is generated in UI Report**.
- This action will open the corresponding source file in your editor and **navigate to the exact location where the failure has occurred**, as illustrated in the following figure:


![Failure occured](media/failure_line.png)
142 changes: 142 additions & 0 deletions docs/application/vscode-ext/tools/diagnostics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# Get Started with .NET Core Diagnostics

.NET Core Diagnostics supports a number of tools that can be used to diagnose Tizen .NET applications.
It includes dotnet-gcdump, dotnet-dump, and dotnet-trace tools to aid .NET developers in diagnosing their applications.

## Prerequisites

Below are the prerequisites for using Tizen .NET Core Diagnostics in Visual Studio Code:

- Make sure that Tizen Studio version 6.0 or above is installed.
- Make sure to set Tizen Studio Path with the installed 6.0 or above, by using the VS Code command: **Tizen: Wizard to set Tizen Baseline SDK path or install a new.**.

## Tizen .NET Core Diagnostics tools

### dotnet-gcdump

#### Step 1. Run dotnet-gcdump tool
- If no Tizen device is connected and no Tizen Emulators are running, then launch the type of Emulator you want to use for diagnosing your application:

![Launch Emulator](media/start_emulator.png)

- Open the **Command Palette** and select **Tizen.NET: Run dotnet diagnostics tools**:

![Run dotnet-gcdump](media/dotnet-diagnostics.png)

- Now select **gcdump** from the drop down list:

![Select dotnet-gcdump](media/dotnet-gcdump-select.png)

- If everything is okay then the application starts, and it also starts collecting the **gcdump** file:

![Tizen application running](media/dotnet-gcdump-running.png)


- Once the gcdump file is collected, a message popup is shown to inform the user, and the file is added to the **gcdump** folder inside the **TizenDiagnostics** folder of the project:

![Completed dotnet-gcdump](media/dotnet-gcdump-completed.png)




#### Step 2. Analyze the gcdump file
- Once the gcdump file is collected, a message popup is shown with the option to open the generated gcdump file. Once we click the **YES** option, it will open the file in **PerfView** tool as seen below:
![gcdump PerfView analysis view](media/dotnet-gcdump-perfview.png)

- Another way to open the **gcdump** file is to right click the gcdump file in **File Explorer Panel** of VS Code and select **Tizen: Open in Diagnostics File Viewer**. It will open the file in **PerfView** tool as seen below:
![gcdump PerfView analysis view](media/dotnet-gcdump-open.png)

> [!NOTE]
> The above two options to open/view gcdump file is supported only in Windows OS.


### dotnet-trace

#### Step 1. Run dotnet-trace tool
- If no Tizen device is connected and no Tizen Emulators are running, then launch the type of Emulator you want to use for diagnosing your application:

![Launch Emulator](media/start_emulator.png)

- Open the **Command Palette** and select **Tizen.NET: Run dotnet diagnostics tools**:

![Run dotnet-trace](media/dotnet-diagnostics.png)

- Now select **trace** from the drop down list:

![Select dotnet-trace](media/dotnet-trace-select.png)

- Now select **profile** from the drop down list:

![Select profile dotnet-trace](media/dotnet-trace-profile.png)

- Now select **format** from the drop down list:

![Select format dotnet-trace](media/dotnet-trace-format.png)

- If everything is okay then the application starts, and it also starts collecting the trace file:

![Tizen application running](media/dotnet-trace-running.png)

- Press **Cancel** button above to stop and generate the trace file.

- Once the trace file is generated, a message popup is shown to inform the user, and the file is added to the **trace** folder inside the **TizenDiagnostics** folder of the project:

![Completed dotnet-trace](media/dotnet-trace-completed.png)



#### Step 2. Analyze the trace file
- There are different tools for different **Format** to view the trace diagnostics data:
- **nettrace**:
- Once the trace file is collected, a message popup is shown with the option to open the generated trace file. Once we click the **YES** option. It will open the file in **PerfView** tool as seen below:
![trace PerfView analysis view](media/dotnet-trace-perfview.png)
- Right click the trace (.nettrace) file in **File Explorer Panel** of VS Code, and then select **Tizen: Open in Diagnostics File Viewer**. It will open the file in **PerfView** tool as seen below:
![trace PerfView analysis view](media/dotnet-trace-open.png)
> [!NOTE]
> The above two options to open/view nettrace file is supported only in Windows OS.
- **speedscope**:
- Right click the trace (.nettrace) file in **File Explorer Panel** of VS Code, and then select **Tizen: Open in Diagnostics File Viewer**. It will open the file in **SpeedScope** web tool as seen below:
![trace SpeedScope analysis view](media/dotnet-trace-speedscope.png)
- **chromium**:
Open Google Chrome browser and type: **chrome://tracing**, or the Microsoft Edge browser and type: **edge://tracing**.
Now click on **Load** button which fill open file explorer and select the **.chromium** file and click **Open**:
![trace VS analysis view](media/dotnet-trace-chromium.png)


### dotnet-dump

#### Step 1. Run dotnet-dump tool
- If no Tizen device is connected and no Tizen Emulators are running then launch the type of Emulator you want to use for diagnosing your application:

![Launch Emulator](media/start_emulator.png)

- Open the **Command Palette** and select **Tizen.NET: Run dotnet diagnostics tools**:

![Run dotnet-dump](media/dotnet-diagnostics.png)

- Now select **dump** from the drop down list:

![Select dotnet-dump](media/dotnet-dump-select.png)

- Now select **dump type** from the drop down list:

![Select type dotnet-dump](media/dotnet-dump-option.png)

- If everything is okay then the application starts, and it also starts collecting the dump file:

![Tizen application running](media/dotnet-dump-running.png)

- Once the dump file is generated, a message popup is shown to inform the user, and the file is added to the **dump** folder inside the **TizenDiagnostics** folder of the project.
- Dump file analysis is also printed in output panel of VS Code, as shown below:

![Completed dotnet-dump](media/dotnet-dump-completed.png)


#### Step 2. Analyze the dump file
- Open the **sdb shell**
- Go to the folder (**/home/owner/share/tmp/sdk_tools**) containing the dump file
- Run the command **dotnet dump analyze {file_name}**

> [!NOTE]
> Please delete the dump file after analyzing, as it takes up a lot of memory space.

Loading