DevEco Studio有没有命令行快捷方式?

DevEco Studio有没有命令行快捷方式? 就像 VSCode 的

code .

可以用命令行方式快捷打开项目目录。

11 回复

Windows 系统

配置环境变量,将 DevEco Studio 的可执行文件路径加入系统 PATH 后,可直接在命令行输入 devecostudio.bat <项目路径> 启动 IDE 并打开指定项目

devecostudio.bat D:\HarmonyProjects\MyApp

macOS/Linux 系统

在终端中通过软链接创建全局命令:

ln -s /Applications/DevEco\ Studio.app/Contents/MacOS/studio /usr/local/bin/devecostudio

之后可直接使用 devecostudio <项目路径> 启动

你好,DevEco Studio 支持Devecostidio或者Deveco命令

Devcostudio64

有的。devecostudiodeveco命令

deveco 不行,devecostudio 可以,或者用 devecostudio64,

  1. 在安装DevEco Studio时,注意安装程序是否有“Add launchers dir to the PATH”之类的选项(通常默认勾选)。
  2. 安装完成后,可以尝试在命令行中输入devecostudiodeveco,看是否能启动。
  3. 如果不行,可以手动将DevEco Studio的安装路径(特别是bin目录)添加到系统环境变量PATH中。
功能 命令 说明
打开当前目录项目 devecostudio . 类似 VSCode 的 code .
新建项目 devecostudio --new-project 启动新建项目向导
调试模式启动 devecostudio --debug 启用开发者调试工具
清除缓存 devecostudio --clear-cache 清理 IDE 临时文件

deveco 不行,devecostudio 可以,或者用 devecostudio64,

devecostudio --help
CompileCommand: exclude com/intellij/openapi/vfs/impl/FilePartNodeRoot.trieDescend bool exclude = true
Some of the common commands and options (sorry, the full list is not yet supported):
  --help      prints a short list of commands and options
  --version   shows version information
  /project/dir
    opens a project from the given directory
  [/project/dir|--temp-project] [--wait] [--line <line>] [--column <column>] file
    opens the file, either in a context of the given project or as a temporary single-file project,
    optionally waiting until the editor tab is closed
  diff <left> <right>
    opens a diff window between <left> and <right> files/directories
  merge <local> <remote> [base] <merged>
    opens a merge window between <local> and <remote> files (with optional common <base>), saving the result to <merged>

DevEco Studio支持命令行启动。在Windows系统中,可通过安装目录下的devecostudio.exe文件启动,例如C:\Program Files\Huawei\DevEco Studio\bin\devecostudio.exe。在macOS中,可通过终端运行open /Applications\DevEco\ Studio.app命令启动。此外,DevEco Studio还支持通过命令行参数执行特定操作,如打开项目或文件。

是的,DevEco Studio支持命令行快捷方式。您可以通过配置环境变量,使用devecostudio命令快速打开项目目录。具体操作如下:

  1. 在DevEco Studio安装目录的bin文件夹中找到可执行文件(例如Windows的devecostudio64.exe)。
  2. 将该路径添加到系统的PATH环境变量中。
  3. 在命令行中,使用devecostudio .即可打开当前目录的项目。

这样您就可以像VSCode的code .一样快速启动项目。

回到顶部