Debugging the flutter‑tizen tool - flutter-tizen/flutter-tizen GitHub Wiki

The flutter-tizen tool is written in Dart. It extends the original Flutter CLI's functionality by (basically) overriding some of its classes and methods at the code level.

  • The flutter-tizen tool creates its snapshot (compiled Dart code) when it's run for the first time. To run the tool directly from source, run this in the repository root:

    flutter/bin/dart bin/flutter_tizen.dart
    
  • To force the snapshot to be re-generated, delete bin/cache/flutter-tizen.snapshot.

  • To debug the tool with the VS Code debugger,

    1. Add the flutter-tizen directory to your workspace.
    2. Install the Dart extension for VS Code.
    3. Click the "Run and Debug" icon in the left menu bar (Ctrl+Shift+D).
    4. Configure the launch.json file of flutter-tizen as follows (replace the values of cwd and args as you need):
      {
        "version": "0.2.0",
        "configurations": [
          {
            "name": "flutter-tizen",
            "request": "launch",
            "type": "dart",
            "cwd": "WORKING_DIRECTORY",
            "program": "${workspaceFolder}/bin/flutter_tizen.dart",
            "args": ["doctor"]
          }
        ]
      }
      
    5. Start debugging (F5).