Skip to content

VSCode Dart Extension // customTool arg does not work with flutter #3756

@point-source

Description

@point-source

Describe the bug
When using the "customTool" property of the vscode launch.config, the dart extension ignores it if it's a flutter project rather than a dart project.

To Reproduce
Steps to reproduce the behavior:

  1. Create a flutter project flutter create -t app custom_tool_flutter_test
  2. Create a launch.config inside the .vscode directory:
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "custom_tool_flutter_test",
            "request": "launch",
            "type": "dart"
        },
        {
            "name": "custom_tool_flutter_test (profile mode)",
            "request": "launch",
            "type": "dart",
            "flutterMode": "profile"
        }
    ]
}
  1. Run the project to ensure that it launches correctly:
Launching lib/main.dart on macOS in debug mode...
  1. Add the "customTool" property to one or more of the configurations:
        {
            "name": "custom_tool_flutter_test",
            "request": "launch",
            "type": "dart",
            "customTool": "echo",
        },
  1. Run the configuration
  2. Observe that the output implies the customTool was ignored:
Launching lib/main.dart on macOS in debug mode...

Expected behavior
The "echo" binary should have been used instead of the "flutter" binary and resulted in all arguments originally passed to flutter being echoed to the console output. No dart or flutter files should have been compiled or run.

Versions (please complete the following information):

  • VS Code version:

Version: 1.63.2 (Universal)
Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3
Date: 2021-12-15T09:37:28.172Z (2 wks ago)
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin arm64 21.2.0

  • Dart extension version: v3.29.0
  • Dart/Flutter SDK version:

Flutter 2.8.1 • channel stable
Framework • revision 77d935af4d (2 weeks ago) • 2021-12-16 08:37:33 -0800
Engine • revision 890a5fca2e
Tools • Dart 2.15.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggingRelates to the debug adapter or process of running debug sessionsin flutterRelates to running Flutter appsis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions