Specify IDE
By default, code-inspector-plugin
will scan the currently running applications in the system and automatically open a running IDE program (automatic recognition only applies to IDEs that support automatic recognition in the table below), so in most cases you do not need to manually specify an IDE.
If you want to specify an IDE, you need to add a file named .env.local
to the project root directory and add the following content: CODE_EDITOR=[IDE Encoding Name]
.
Taking vscode as an example, its corresponding IDE Encoding Name
is code
, so the following content should be added in .env.local
:
# specify IDE is vscode
CODE_EDITOR=code
Automatic Recognition IDE
The IDE that supports automatic recognition and the corresponding IDE Encoding Name are shown in the table below:
IDE | IDE Encoding Name |
---|---|
Visual Studio Code(vscode) | code |
Visual Studio Code - Insiders(vscode 内部版) | code_insiders |
WebStorm | webstorm |
Atom | atom |
HBuilderX | hbuilder |
PhpStorm | phpstorm |
Pycharm | pycharm |
IntelliJ IDEA | idea |
Other IDE
If the IDE you are using is not in the list that supports automatic recognition mentioned above or if it is an unofficial IDE, you need to add a file named .env.local
to the project root directory and add the following content: CODE_EDITOR=[IDE Execution Path]
, the reference of getting IDE Execution Path
is as follows.
MAC
Taking VSCodium as an example (the other IDE steps are the same), to get the IDE Execution Path
in the MAC system, the steps are as follows:
- Open VSCodium
- Open the MAC's own Activity Monitor, find VSCodium in the process, and double-click:
- After double clicking, in the
Open File and Port
tab of the window, find the corresponding path under the first txt, which is theIDE Execution Path
: - Copy the
IDE Execution Path
to the.env.local
file:
# .env.local
CODE_EDITOR=/Applications/VSCodium.app/Contents/MacOS/Electron
Windows
Taking Webstorm as an example (other IDE steps are the same), to get the IDE Execution Path
in the Windows system, the steps are as follows:
- Find the shortcut of the IDE (if not available, create one), right-click on the shortcut, and select
属性
: - After opening, find the
快捷
tab, the value of目标
is theIDE Execution Path
: - Copy the
IDE Execution Path
to the.env.local
file:
# .env.local
CODE_EDITOR=D:\webstorm\WebStorm 2023.1.3\bin\webstorm64.exe