在flutter中添加更多调试设备

问题描述 投票:0回答:1

我正在使用flutter进行Web开发,我想在不同的浏览器上运行它......

opera、chrome、firefox 等...

所以我正在尝试找到一种方法将其添加到我的设备列表中

我下载了 Opera 并设置了默认浏览器,但它无法识别

默认情况下使用

edge web

我使用 vscode 作为我的编辑器

颤振装置

输出:

1 connected device:
Edge (web) • edge 

有没有办法将其他浏览器添加到我的设备,例如(chrome、firefox 或 opera)??

flutter web visual-studio-code opera
1个回答
0
投票

您无法像 Android 或 iOS 设备那样添加多个浏览器设备。 dart 扩展仅支持网络浏览器的

chrome
default
source)。

在 VS Code 中,打开设置并搜索

dart.devToolsBrowser
。然后,您可以将开发工具浏览器更改为默认值,并使用 Flutter Web 应用程序的默认 Web 浏览器。

如果您想更改哪个浏览器被识别为“chrome”,您还可以在终端中更新CHROME_EXECUTABLE

export CHROME_EXECUTABLE="/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"

export CHROME_EXECUTABLE="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome“

//  restart the shell:

source ~/.zshrc
© www.soinside.com 2019 - 2024. All rights reserved.