From ad8958901bf100e4a25f4271cbe863532dac313d Mon Sep 17 00:00:00 2001 From: LU XIANGRUI <1078666705@qq.com> Date: Wed, 25 Nov 2026 15:04:53 +0900 Subject: [PATCH] feat(run): Flutter run configuration fields of the Flutter plugin (#5782) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Flutter run configuration gets Dart entrypoint, Build mode (Debug / Profile / Release), Build flavor, Additional run args and Additional attach args next to the pinned Device. Mode and flavor become --profile / --release and --flavor= on flutter run, are read back from existing command lines, and reach debug sessions too; hot reload stays debug-only. Run › Flutter Attach attaches with the selected configuration's entry point and attach args. The JetBrains importer keeps attachArgs as a form field instead of reporting it ignored. Part of #4096 Co-authored-by: wildcatDownstairs <26499420+wildcatDownstairs@users.noreply.github.com> --- crates/ide-run/src/import/jetbrains.rs | 25 +++++++---- crates/ide-run/tests/import_jetbrains.rs | 15 ++++++- docs/en/guide/debugging.mdx | 2 +- docs/zh/guide/debugging.mdx | 2 +- .../debugger/__tests__/launch.test.ts | 18 ++++++++ src/features/debugger/launch.ts | 8 +++- src/features/run/flutterType.test.ts | 42 ++++++++++++++++++- src/features/run/flutterType.ts | 40 ++++++++++++++++-- src/features/run/index.ts | 25 +++++++++++ src/platform/locales/text/en.json | 15 ++++++- src/platform/locales/text/ru.json | 2 - src/platform/locales/text/tr.json | 2 - src/platform/locales/text/zh-TW.json | 2 - src/platform/locales/text/zh.json | 14 ++++++- 14 files changed, 182 insertions(+), 30 deletions(-) diff --git a/crates/ide-run/src/import/jetbrains.rs b/crates/ide-run/src/import/jetbrains.rs index 246b84cf74..5ee6cc9f6a 100644 --- a/crates/ide-run/src/import/jetbrains.rs +++ b/crates/ide-run/src/import/jetbrains.rs @@ -350,7 +350,7 @@ impl Cx<'_> { SPRING_BOOT => self.java_app(name, c, true, &mut ignored)?, GO_APPLICATION => self.go_config(name, c, false, &mut ignored)?, GO_TEST => self.go_config(name, c, true, &mut ignored)?, - FLUTTER => self.flutter(name, c, &mut ignored)?, + FLUTTER => self.flutter(name, c)?, COMPOUND => { members = c.children_named("toRun").filter_map(|t| t.attr("name")).map(str::to_owned).collect(); config(name, "compound", String::new(), Vec::new(), None) @@ -440,8 +440,10 @@ impl Cx<'_> { } /// The Flutter plugin's configuration (its `SdkFields`): `flutter run` in the entry's package, - /// `additionalArgs` then `--flavor=` after the entry, as the plugin passes them. - fn flutter(&self, name: &str, c: &El, ignored: &mut Vec) -> Res { + /// `--flavor=` then `additionalArgs` after the entry, in the order the Flutter + /// form writes them. `attachArgs` (for Flutter Attach) is a form field: with it the form's + /// params are stored. + fn flutter(&self, name: &str, c: &El) -> Res { let Some(entry) = self.path(c.option("filePath"))? else { return Err(SkipReason::NothingToRun); }; @@ -449,9 +451,19 @@ impl Cx<'_> { let Some((package, _)) = dart_package(self.root, &entry) else { return Err(SkipReason::MissingFile { file: "pubspec.yaml".into() }); }; - let mut extra = self.words(c.option("additionalArgs"))?; - extra.extend(self.text(c.option("buildFlavor"))?.map(|f| format!("--flavor={f}"))); + let flavor = self.text(c.option("buildFlavor"))?; + let mut extra: Vec = flavor.iter().map(|f| format!("--flavor={f}")).collect(); + extra.extend(self.words(c.option("additionalArgs"))?); let mut rc = flutter_run(name, self.root, &package, &entry, extra); + if let Some(attach) = self.text(c.option("attachArgs"))? { + let params = [ + ("entry", rc.args.get(2).cloned()), + ("flavor", flavor), + ("arguments", self.text(c.option("additionalArgs"))?), + ("attachArgs", Some(attach)), + ]; + rc.extras.params = params.into_iter().filter_map(|(k, v)| Some((k.to_owned(), v?))).collect(); + } // ``. let envs = c.children_named("option").filter(|o| o.attr("name") == Some("envs")); for e in envs.flat_map(|o| o.children.iter()).flat_map(|m| m.children_named("entry")) { @@ -459,9 +471,6 @@ impl Cx<'_> { rc.env.insert(key.to_owned(), e.attr("value").unwrap_or_default().to_owned()); } } - if self.text(c.option("attachArgs"))?.is_some() { - ignored.push("attachArgs".into()); - } Ok(rc) } diff --git a/crates/ide-run/tests/import_jetbrains.rs b/crates/ide-run/tests/import_jetbrains.rs index d090f4b3d6..8f5596afcf 100644 --- a/crates/ide-run/tests/import_jetbrains.rs +++ b/crates/ide-run/tests/import_jetbrains.rs @@ -1238,11 +1238,22 @@ fn flutter_flavors_entry_points_arguments_and_envs() { assert_eq!(c.kind, "flutter"); assert_eq!( c.args, - s(&["run", "-t", "lib/main_dev.dart", "--dart-define=API=https://dev.example", "--verbose", "--flavor=dev"]) + s(&["run", "-t", "lib/main_dev.dart", "--flavor=dev", "--dart-define=API=https://dev.example", "--verbose"]) ); assert_eq!(cwd(c), Some(PathBuf::from("app"))); assert_eq!(c.env, BTreeMap::from([("FLUTTER_LOG".into(), "1".into())])); - assert_eq!(ignored(&r, "Dev"), ["attachArgs"]); + // The Flutter form's fields, Additional attach args among them. + let params = |pairs: &[(&str, &str)]| pairs.iter().map(|(k, v)| (k.to_string(), v.to_string())).collect(); + assert_eq!( + c.extras.params, + params(&[ + ("entry", "lib/main_dev.dart"), + ("flavor", "dev"), + ("arguments", r#"--dart-define=API="https://dev.example" --verbose"#), + ("attachArgs", "--debug-port 9000"), + ]) + ); + assert!(ignored(&r, "Dev").is_empty()); assert_eq!(reason(&r, "Gone"), &SkipReason::MissingFile { file: "pubspec.yaml".into() }); assert_eq!(reason(&r, "No entry"), &SkipReason::NothingToRun); } diff --git a/docs/en/guide/debugging.mdx b/docs/en/guide/debugging.mdx index f1c5f7e6a9..016c9cf331 100644 --- a/docs/en/guide/debugging.mdx +++ b/docs/en/guide/debugging.mdx @@ -164,7 +164,7 @@ Each form has **Host** and **Port** fields and shows the command to start the re - **Java HotSwap**: **Run › Debugging Actions › Reload Changed Classes** compiles your changes and reloads the changed classes into the running Java debug session. Active frames keep running the old code until they return. When JDT LS finishes a build after a save, the IDE offers the reload. - **JavaScript in the browser**: a **JavaScript Debug** configuration opens a URL in Chrome or Edge and debugs the page's scripts in their sources through source maps. See [JavaScript and TypeScript](/en/languages/javascript#debugging). - **Maven and Gradle**: debugging a Maven or Gradle configuration starts the JVM with a JDWP agent and attaches java-debug to it. -- **Dart / Flutter**: **Hot Reload** and **Hot Restart** are available while a Dart session is running. In a Flutter project, the device selector next to the run configuration chooses where Run and Debug start the app; a run configuration's **Device** field pins it to one device. Saving a Dart file of a running Flutter debug session also hot reloads the app, unless the file has errors. Turn this off with **Hot reload on save** in **Settings › Build, Execution, Deployment › Debugger**. +- **Dart / Flutter**: **Hot Reload** and **Hot Restart** are available while a Dart session is running. In a Flutter project, the device selector next to the run configuration chooses where Run and Debug start the app; a run configuration's **Device** field pins it to one device. A Flutter configuration also sets the **Build mode** (Debug, Profile or Release; Profile and Release run without the debugger or hot reload), **Build flavor** and **Additional run args** (such as `--dart-define=KEY=value`); **Run › Flutter Attach** attaches the debugger to the app of the selected Flutter configuration that was started elsewhere (an add-to-app host), passing its **Additional attach args** to `flutter attach`. Saving a Dart file of a running Flutter debug session also hot reloads the app, unless the file has errors. Turn this off with **Hot reload on save** in **Settings › Build, Execution, Deployment › Debugger**. - **PHP**: if the PHP interpreter does not load Xdebug, breakpoints are skipped; the IDE warns about this when the session starts. - **Python**: **Settings › Build, Execution, Deployment › Python Debugger** has **Attach to subprocess automatically while debugging** and **Gevent compatible**. diff --git a/docs/zh/guide/debugging.mdx b/docs/zh/guide/debugging.mdx index 0a8b964e02..53562dfc74 100644 --- a/docs/zh/guide/debugging.mdx +++ b/docs/zh/guide/debugging.mdx @@ -166,7 +166,7 @@ C 和 C++ 的配置也可以改用 GDB 14 及以上版本(`gdb -i dap`): - **Java HotSwap**:**运行 › 调试操作 › 重新加载已更改的类** 编译改动,并把变化的类重新加载到正在运行的 Java 调试会话中。已经在执行的帧要等返回后才会用上新代码。保存后 JDT LS 自动完成构建时,IDE 也会提示是否重新加载。 - **浏览器中的 JavaScript**:**JavaScript 调试** 配置在 Chrome 或 Edge 中打开一个 URL,通过 source map 在源码中调试页面脚本。见 [JavaScript 与 TypeScript](/zh/languages/javascript)。 - **Maven 和 Gradle**:调试 Maven 或 Gradle 配置时,IDE 会让 JVM 带上 JDWP agent 启动,再用 java-debug 附加上去。 -- **Dart / Flutter**:Dart 会话运行时可以用 **热重载** 和 **热重启**。在 Flutter 项目中,运行配置旁边的设备选择器决定运行和调试在哪台设备上启动应用;运行配置的 **设备** 字段可以固定使用某台设备。保存正在运行的 Flutter 调试会话里的 Dart 文件时也会自动热重载,文件有错误时跳过。可在 **设置 › 构建、执行、部署 › 调试器** 中关闭 **保存时热重载**。 +- **Dart / Flutter**:Dart 会话运行时可以用 **热重载** 和 **热重启**。在 Flutter 项目中,运行配置旁边的设备选择器决定运行和调试在哪台设备上启动应用;运行配置的 **设备** 字段可以固定使用某台设备。Flutter 配置还可以设置 **构建模式**(调试、性能分析或发布;后两者不带调试器,也不能热重载)、**构建 flavor** 和 **附加 run 参数**(例如 `--dart-define=KEY=value`);**运行 › Flutter 附加** 把调试器附加到所选 Flutter 配置在别处启动的应用(例如 add-to-app 的宿主应用),并把 **附加 attach 参数** 传给 `flutter attach`。保存正在运行的 Flutter 调试会话里的 Dart 文件时也会自动热重载,文件有错误时跳过。可在 **设置 › 构建、执行、部署 › 调试器** 中关闭 **保存时热重载**。 - **PHP**:如果 PHP 解释器没有加载 Xdebug,断点会被跳过;会话启动时 IDE 会提示。 - **Python**:**设置 › 构建、执行、部署 › Python 调试器** 中有 **调试时自动附加到子进程** 和 **兼容 Gevent**。 diff --git a/src/features/debugger/__tests__/launch.test.ts b/src/features/debugger/__tests__/launch.test.ts index b7fdb8a9ae..cf041f2300 100644 --- a/src/features/debugger/__tests__/launch.test.ts +++ b/src/features/debugger/__tests__/launch.test.ts @@ -100,6 +100,24 @@ describe("Flutter device", () => { expect(attach({ device: "chrome" }).toolArgs).toEqual(["-d", "chrome"]); }); + it("debugs the build mode and flavor of the command line", () => { + const launch = launchConfigFor( + flutter({ args: ["run", "-t", "lib/main.dart", "--profile", "--flavor=dev"] }), + "/p", + ); + expect(extra(launch).toolArgs).toEqual(["--profile", "--flavor=dev"]); + }); + + it("attaches a Flutter configuration with its entry point and attach args", () => { + const config = flutter({ + args: ["run", "-t", "lib/dev.dart", "--flavor=dev"], + params: { entry: "lib/dev.dart", flavor: "dev", attachArgs: "--debug-port 9000", request: "attach" }, + }); + const launch = launchConfigFor(config, "/p"); + expect(launch).toMatchObject({ request: "attach", program: "/p/lib/dev.dart" }); + expect(extra(launch)).toEqual({ __flutter: true, toolArgs: ["-d", "macos", "--debug-port", "9000"] }); + }); + it("leaves the choice to flutter without a device list", () => { useFlutterDevices.setState({ list: null }); expect(launchConfigFor(flutter(), "/p")?.extraJson).toBeNull(); diff --git a/src/features/debugger/launch.ts b/src/features/debugger/launch.ts index 7a3650fc9c..4327367d3d 100644 --- a/src/features/debugger/launch.ts +++ b/src/features/debugger/launch.ts @@ -399,22 +399,26 @@ function flutterLaunch(rc: RunConfig, cwd: string, adapter: string): LaunchConfi * `params.vm-service-uri` pins the VM Service endpoint (`flutter attach * --debug-uri`); without it `flutter attach` discovers the running app on the * device. `params.device`, else the toolbar's device, becomes `-d `. + * A Flutter run configuration (Flutter Attach) adds its entry point as + * `--target` and its `params.attachArgs`. */ function flutterAttach(rc: RunConfig, cwd: string, adapter: string): LaunchConfig { const p = rc.params ?? {}; const uri = p["vm-service-uri"] || p.vmServiceUri; const device = flutterDeviceFor(rc); + const entry = rc.kind === "flutter" ? (parseFlutterRun(rc.args).entry ?? "lib/main.dart") : null; + const toolArgs = [...(device ? ["-d", device] : []), ...parseArgs(p.attachArgs ?? "")]; // `__flutter` tells the adapter launcher to use `flutter debug_adapter` // whatever the working directory holds (an add-to-app module lives below a // workspace root that has no Flutter dependency of its own). It is removed // before the request reaches the adapter. const extra: Record = { __flutter: true }; if (uri) extra.vmServiceUri = uri; - if (device) extra.toolArgs = ["-d", device]; + if (toolArgs.length) extra.toolArgs = toolArgs; return { ...base(rc, adapter, cwd), request: "attach", - program: null, + program: entry && join(cwd, entry), extraJson: JSON.stringify(extra), }; } diff --git a/src/features/run/flutterType.test.ts b/src/features/run/flutterType.test.ts index 6d18c67420..14b2c90db1 100644 --- a/src/features/run/flutterType.test.ts +++ b/src/features/run/flutterType.test.ts @@ -2,6 +2,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import type { FlutterDevice, RunConfig } from "@/platform/ipc"; import { provideNotificationService } from "@/workbench/contributions"; import { matchFlutterDevice, useFlutterDevices } from "@/workbench/flutterDevices"; +import { supportsHotReload } from "./flutterHotReload"; import { flutterType } from "./flutterType"; const device = (id: string, name: string, unavailable: string | null = null): FlutterDevice => ({ @@ -40,13 +41,50 @@ describe("Flutter run configurations", () => { afterEach(() => useFlutterDevices.setState({ preferred: null, list: null })); it("builds the command line from the form and reads it back", () => { - const params = { entry: "lib/dev.dart", device: "chrome", arguments: "--flavor dev" }; + const params = { + entry: "lib/dev.dart", + device: "chrome", + mode: "profile", + flavor: "dev", + arguments: "--dart-define=KEY=value", + }; const line = flutterType.commandLine(params)!; expect(line).toEqual({ command: "flutter", - args: ["run", "-t", "lib/dev.dart", "-d", "chrome", "--flavor", "dev"], + args: ["run", "-t", "lib/dev.dart", "-d", "chrome", "--profile", "--flavor=dev", "--dart-define=KEY=value"], }); expect(flutterType.paramsFrom!({ ...config([]), ...line })).toEqual(params); + expect(flutterType.commandLine({ entry: "lib/main.dart", mode: "" })!.args).toEqual(["run", "-t", "lib/main.dart"]); + }); + + it("hot reloads only in debug mode", () => { + const withMode = (mode: string) => ({ ...config([]), ...flutterType.commandLine({ mode, flavor: "dev" })! }); + expect(supportsHotReload(withMode(""))).toBe(true); + expect(supportsHotReload(withMode("profile"))).toBe(false); + expect(supportsHotReload(withMode("release"))).toBe(false); + }); + + it("reproduces the command line of an imported Flutter plugin configuration", () => { + // What the JetBrains importer stores for a configuration with Additional attach args. + const params = { + entry: "lib/main_dev.dart", + flavor: "dev", + arguments: '--dart-define=API="https://dev.example" --verbose', + attachArgs: "--debug-port 9000", + }; + expect(flutterType.commandLine(params)!.args).toEqual([ + "run", + "-t", + "lib/main_dev.dart", + "--flavor=dev", + "--dart-define=API=https://dev.example", + "--verbose", + ]); + }); + + it("reads the build mode and flavor from any spelling", () => { + const params = flutterType.paramsFrom!(config(["--debug", "--flavor", "staging", "--release", "-v"])); + expect(params).toEqual({ entry: "lib/main.dart", mode: "release", flavor: "staging", arguments: "-v" }); }); it("reads the = spellings back into the form without repeating them on save", () => { diff --git a/src/features/run/flutterType.ts b/src/features/run/flutterType.ts index fc6961ded4..5791338243 100644 --- a/src/features/run/flutterType.ts +++ b/src/features/run/flutterType.ts @@ -11,6 +11,7 @@ import { commandName } from "./commandName"; import { formatArgs, parseArgs } from "./configs"; const DEFAULT_ENTRY = "lib/main.dart"; +const MODES = new Set(["--debug", "--profile", "--release"]); /** The executable of Flutter / Dart commands: the one place that picks it. */ export const dartTool = (flutter: boolean) => (flutter ? "flutter" : "dart"); @@ -23,7 +24,7 @@ export const flutterType: RunConfigTypeContribution = { debugAdapter: "dart", defaults: { entry: DEFAULT_ENTRY }, fields: [ - { key: "entry", label: "Entry point", mono: true, browse: "file", placeholder: DEFAULT_ENTRY }, + { key: "entry", label: "Dart entrypoint", mono: true, browse: "file", placeholder: DEFAULT_ENTRY }, { key: "device", label: "Device", @@ -32,11 +33,28 @@ export const flutterType: RunConfigTypeContribution = { hint: "A device id pins this configuration to that device", suggestions: () => usableFlutterDevices().map((d) => d.id), }, + { + key: "mode", + label: "Build mode", + control: "select", + options: [ + { value: "", label: "Debug" }, + { value: "profile", label: "Profile" }, + { value: "release", label: "Release" }, + ], + }, + { key: "flavor", label: "Build flavor", mono: true, placeholder: "e.g. dev" }, { key: "arguments", - label: "Additional arguments", + label: "Additional run args", mono: true, - placeholder: "e.g. --flavor dev --dart-define=KEY=value", + placeholder: "e.g. --dart-define=KEY=value", + }, + { + key: "attachArgs", + label: "Additional attach args", + mono: true, + hint: "Passed to flutter attach by Flutter Attach", }, ], commandLine: (p) => ({ @@ -46,17 +64,31 @@ export const flutterType: RunConfigTypeContribution = { "-t", p.entry?.trim() || DEFAULT_ENTRY, ...(p.device?.trim() ? ["-d", p.device.trim()] : []), + ...(p.mode === "profile" || p.mode === "release" ? [`--${p.mode}`] : []), + ...(p.flavor?.trim() ? [`--flavor=${p.flavor.trim()}`] : []), ...parseArgs(p.arguments ?? ""), ], }), paramsFrom(c) { if (commandName(c.command) !== "flutter" || c.args[0] !== "run") return null; const { entry, device, rest } = parseFlutterRun(c.args); + let mode = ""; + let flavor = ""; + const other: string[] = []; + for (let i = 0; i < rest.length; i++) { + const arg = rest[i]!; + if (MODES.has(arg)) mode = arg === "--debug" ? "" : arg.slice(2); + else if (arg === "--flavor") flavor = rest[++i] ?? ""; + else if (arg.startsWith("--flavor=")) flavor = arg.slice("--flavor=".length); + else other.push(arg); + } return { entry: entry ?? DEFAULT_ENTRY, ...(device ? { device } : {}), + ...(mode ? { mode } : {}), + ...(flavor ? { flavor } : {}), ...(c.command !== "flutter" ? { executable: c.command } : {}), - arguments: formatArgs(rest), + arguments: formatArgs(other), }; }, async prepareLaunch(config) { diff --git a/src/features/run/index.ts b/src/features/run/index.ts index e4e840b2fe..d92c698771 100644 --- a/src/features/run/index.ts +++ b/src/features/run/index.ts @@ -295,6 +295,22 @@ async function runCurrentFile(debug: boolean) { selectConfig(CURRENT_FILE); } +/** Flutter Attach: `flutter attach` with the selected Flutter configuration, to an app started elsewhere. */ +async function flutterAttachSelected() { + await ensureConfigs(); + const config = selectedConfig(); + if (config?.kind !== "flutter") { + notifications().notify({ + group: "run", + level: "info", + title: "Select a Flutter run configuration to attach with", + key: "run-flutter-attach", + }); + return; + } + await executeAction("debug.startConfig", { ...config, params: { ...config.params, request: "attach" } }); +} + function nothingToRun() { notifications().notify({ group: "run", @@ -629,6 +645,15 @@ export function activate(): () => void { when: "flutterProject", run: () => restartFlutterDaemon(), }, + { + id: "run.flutterAttach", + title: "Flutter Attach", + category: "Run", + icon: "debug", + description: "Attach the debugger to the app of the selected Flutter configuration, started elsewhere", + when: "flutterProject", + run: () => flutterAttachSelected(), + }, { id: "run.flutterHotReload", title: "Hot Reload", diff --git a/src/platform/locales/text/en.json b/src/platform/locales/text/en.json index 8695e24ed7..5e773694b4 100644 --- a/src/platform/locales/text/en.json +++ b/src/platform/locales/text/en.json @@ -3456,11 +3456,22 @@ "Flutter DevTools start-up failed": "Flutter DevTools start-up failed", "“{name}” is pinned to this device, so the launch may fail. Connect it, or change the device in the run configuration.": "“{name}” is pinned to this device, so the launch may fail. Connect it, or change the device in the run configuration.", "Run a Flutter app on a device": "Run a Flutter app on a device", - "Entry point": "Entry point", "Device": "Device", "The device selected in the toolbar": "The device selected in the toolbar", "A device id pins this configuration to that device": "A device id pins this configuration to that device", - "e.g. --flavor dev --dart-define=KEY=value": "e.g. --flavor dev --dart-define=KEY=value", + "Dart entrypoint": "Dart entrypoint", + "Build mode": "Build mode", + "Profile": "Profile", + "Release": "Release", + "Build flavor": "Build flavor", + "e.g. dev": "e.g. dev", + "Additional run args": "Additional run args", + "e.g. --dart-define=KEY=value": "e.g. --dart-define=KEY=value", + "Additional attach args": "Additional attach args", + "Passed to flutter attach by Flutter Attach": "Passed to flutter attach by Flutter Attach", + "Flutter Attach": "Flutter Attach", + "Attach the debugger to the app of the selected Flutter configuration, started elsewhere": "Attach the debugger to the app of the selected Flutter configuration, started elsewhere", + "Select a Flutter run configuration to attach with": "Select a Flutter run configuration to attach with", "Hot reload on save": "Hot reload on save", "Saving a Dart file of a running Flutter debug session reloads the app, unless the file has errors.": "Saving a Dart file of a running Flutter debug session reloads the app, unless the file has errors.", "Hot reload on save failed: {0}": "Hot reload on save failed: {0}", diff --git a/src/platform/locales/text/ru.json b/src/platform/locales/text/ru.json index f66102ab75..dd03ea734d 100644 --- a/src/platform/locales/text/ru.json +++ b/src/platform/locales/text/ru.json @@ -9713,10 +9713,8 @@ "Flutter DevTools start-up failed": "Не удалось запустить Flutter DevTools", "“{name}” is pinned to this device, so the launch may fail. Connect it, or change the device in the run configuration.": "Конфигурация «{name}» привязана к этому устройству, поэтому запуск может завершиться ошибкой. Подключите его или выберите другое устройство в конфигурации запуска.", "Run a Flutter app on a device": "Запустить приложение Flutter на устройстве", - "Entry point": "Точка входа", "The device selected in the toolbar": "Устройство, выбранное на панели инструментов", "A device id pins this configuration to that device": "Идентификатор устройства привязывает эту конфигурацию к нему", - "e.g. --flavor dev --dart-define=KEY=value": "например, --flavor dev --dart-define=KEY=value", "Hot reload on save": "Горячая перезагрузка при сохранении", "Saving a Dart file of a running Flutter debug session reloads the app, unless the file has errors.": "Сохранение файла Dart во время запущенной сессии отладки Flutter перезагружает приложение, если в файле нет ошибок.", "Hot reload on save failed: {0}": "Ошибка горячей перезагрузки при сохранении: {0}", diff --git a/src/platform/locales/text/tr.json b/src/platform/locales/text/tr.json index 77e7cc449f..b263591392 100644 --- a/src/platform/locales/text/tr.json +++ b/src/platform/locales/text/tr.json @@ -2687,11 +2687,9 @@ "Flutter DevTools start-up failed": "Flutter DevTools başlatılamadı", "“{name}” is pinned to this device, so the launch may fail. Connect it, or change the device in the run configuration.": "“{name}” bu cihaza sabitlendiğinden başlatma başarısız olabilir. Cihazı bağlayın veya çalıştırma yapılandırmasından değiştirin.", "Run a Flutter app on a device": "Flutter uygulamasını cihazda çalıştır", - "Entry point": "Giriş noktası", "Device": "Cihaz", "The device selected in the toolbar": "Araç çubuğunda seçilen cihaz", "A device id pins this configuration to that device": "Cihaz kimliği bu yapılandırmayı ilgili cihaza sabitler", - "e.g. --flavor dev --dart-define=KEY=value": "ör. --flavor dev --dart-define=KEY=value", "Hot reload on save": "Kaydetmede sıcak yeniden yükleme", "Saving a Dart file of a running Flutter debug session reloads the app, unless the file has errors.": "Çalışan Flutter hata ayıklama oturumunda Dart dosyası kaydedildiğinde, dosyada hata yoksa uygulama yeniden yüklenir.", "Hot reload on save failed: {0}": "Kaydetmede sıcak yeniden yükleme başarısız: {0}", diff --git a/src/platform/locales/text/zh-TW.json b/src/platform/locales/text/zh-TW.json index 1f6b161122..9a4bcc81bb 100644 --- a/src/platform/locales/text/zh-TW.json +++ b/src/platform/locales/text/zh-TW.json @@ -9099,10 +9099,8 @@ "Flutter DevTools start-up failed": "Flutter DevTools 啟動失敗", "“{name}” is pinned to this device, so the launch may fail. Connect it, or change the device in the run configuration.": "「{name}」固定使用此裝置,啟動可能會失敗。請連線該裝置,或在執行組態中更改裝置。", "Run a Flutter app on a device": "在裝置上執行 Flutter 應用", - "Entry point": "入口檔案", "The device selected in the toolbar": "工具列中選擇的裝置", "A device id pins this configuration to that device": "填寫裝置 ID 後,此組態固定使用該裝置", - "e.g. --flavor dev --dart-define=KEY=value": "例如 --flavor dev --dart-define=KEY=value", "Hot reload on save": "儲存時熱過載", "Saving a Dart file of a running Flutter debug session reloads the app, unless the file has errors.": "儲存正在執行的 Flutter 偵錯工作階段裡的 Dart 檔案時重新載入應用,檔案有錯誤時跳過。", "Hot reload on save failed: {0}": "儲存時熱過載失敗:{0}", diff --git a/src/platform/locales/text/zh.json b/src/platform/locales/text/zh.json index 725276d215..301ab9049b 100644 --- a/src/platform/locales/text/zh.json +++ b/src/platform/locales/text/zh.json @@ -9795,10 +9795,20 @@ "Flutter DevTools start-up failed": "Flutter DevTools 启动失败", "“{name}” is pinned to this device, so the launch may fail. Connect it, or change the device in the run configuration.": "“{name}”固定使用此设备,启动可能会失败。请连接该设备,或在运行配置中更改设备。", "Run a Flutter app on a device": "在设备上运行 Flutter 应用", - "Entry point": "入口文件", "The device selected in the toolbar": "工具栏中选择的设备", "A device id pins this configuration to that device": "填写设备 ID 后,此配置固定使用该设备", - "e.g. --flavor dev --dart-define=KEY=value": "例如 --flavor dev --dart-define=KEY=value", + "Dart entrypoint": "Dart 入口文件", + "Build mode": "构建模式", + "Release": "发布", + "Build flavor": "构建 flavor", + "e.g. dev": "例如 dev", + "Additional run args": "附加 run 参数", + "e.g. --dart-define=KEY=value": "例如 --dart-define=KEY=value", + "Additional attach args": "附加 attach 参数", + "Passed to flutter attach by Flutter Attach": "Flutter 附加运行 flutter attach 时传入", + "Flutter Attach": "Flutter 附加", + "Attach the debugger to the app of the selected Flutter configuration, started elsewhere": "将调试器附加到所选 Flutter 配置在别处启动的应用", + "Select a Flutter run configuration to attach with": "请选择用于附加的 Flutter 运行配置", "Hot reload on save": "保存时热重载", "Saving a Dart file of a running Flutter debug session reloads the app, unless the file has errors.": "保存正在运行的 Flutter 调试会话里的 Dart 文件时重新加载应用,文件有错误时跳过。", "Hot reload on save failed: {0}": "保存时热重载失败:{0}",