Recommended settings for VS Code - flutter-tizen/flutter-tizen GitHub Wiki

App developer

  1. Install the Dart and Flutter extensions.
  2. Enable Format on Save (editor.formatOnSave) in the VS Code settings.

Plugin developer

  1. Install the Dart and C/C++ extensions.
  2. Open the VS Code settings (JSON) by pressing Ctrl+Shift+P and typing Preferences: Open User Settings (JSON).
  3. Customize the default settings of the C/C++ extension as follows:
    "C_Cpp.default.cppStandard": "c++17",
    "C_Cpp.default.includePath": [
        "${workspaceFolder}/**",
        "[SDK_PATH]/flutter/bin/cache/artifacts/engine/tizen-common/**",
        "[SDK_PATH]/flutter/bin/cache/dart-sdk/include/**",
        "${HOME}/tizen-studio/platforms/tizen-5.5/wearable/rootstraps/wearable-5.5-device.core/usr/include/**",
    ]
    
    • "[SDK_PATH]/flutter/.../**": Contains common engine and embedder headers. Replace [SDK_PATH] with your own path to the flutter-tizen installation directory.
    • ${HOME}/tizen-studio/.../**": Contains Tizen API headers. You can adjust the path as necessary if tizen-studio is installed in a different location or if you want to use a different rootstrap.
  4. Alternatively, if you want to customize the settings of individual folders in the workspace, press Ctrl+Shift+P and type C/C++: Edit Configurations (JSON) to open c_cpp_properties.json.

Embedder developer

  1. Install the C/C++ extension.
  2. Compile the embedder for arm and make sure the src/out/tizen_arm/compile_commands.json file has been generated.
  3. Add the root folder (embedder) to the workspace.
  4. Press Ctrl+Shift+P and type C/C++: Edit Configurations (JSON) to open c_cpp_properties.json.
  5. Configure the properties in the JSON file as follows:
    "includePath": [
      "${workspaceFolder}/src",
      "${workspaceFolder}/src/flutter/shell/platform/common/public"
    ],
    "compileCommands": "${workspaceFolder}/src/out/tizen_arm/compile_commands.json",
    "cppStandard": "c++17",
    
  6. To disable code analysis for third-party dependencies and sysroot files, open the VS Code settings (JSON) and add the following properties.
    "C_Cpp.files.exclude": {
      "/usr/include/**": true,
      "**/embedder/src/third_party/**": true,
      "**/embedder/src/sysroot/**": true
    },