Skip to content
On this page

IDE

code-inspector-plugin scans currently running processes in the system and automatically recognizes the IDE being used, so in most cases, you don't need to manually specify the IDE.

Specifying IDE

If code-inspector-plugin fails to automatically recognize your IDE, or if you're running multiple IDEs and want to specify which one to open, you have two ways to specify the IDE: through the .env.local file or by adding the editor parameter in codeInspectorPlugin.

TIP

If project team members use different IDEs, using the editor parameter might cause conflicts between them, so using .env.local file is more recommended

Specifying via .env.local file

Add a file named .env.local in the project root directory and add: CODE_EDITOR=[IDE code name]. For example, for vscode, its corresponding IDE code name is code, so add the following to .env.local:

shell
# Specify IDE as vscode
CODE_EDITOR=code

Specifying via editor parameter

You can also specify the IDE by adding the editor parameter in codeInspectorPlugin:

ts
codeInspectorPlugin({
    bundler: 'vite',
    editor: 'code', // Specify IDE as vscode
})

Supported IDE List

The following table shows the IDEs that support automatic detection, their corresponding IDE code names, and supported systems:

IDEIDE Code NameMacOSWindowsLinux
Visual Studio Codecode
Cursorcursor
Visual Studio Code - Insiderscode-insiders
VSCodiumcodium
WebStormwebstorm
Atomatom
HBuilderXhbuilder
PhpStormphpstorm
Pycharmpycharm
IntelliJ IDEAidea
Bracketsbrackets
Appcodeappcode
Atom Betaatom-beta
Clionclion
Riderrider
Rubyminerubymine
Emacsemacs
Sublime Textsublime
Notepad++notepad
Vimvim

Other IDEs

If your IDE is not in the above list of automatically supported IDEs, detection may fail. You'll need to add a file named .env.local in the project root directory and add: CODE_EDITOR=[IDE executable path]. Here's how to find the IDE executable path.

MAC System

Taking VSCodium as an example (steps are the same for other IDEs), to get the IDE executable path on MAC system:

  1. Open the IDE program VSCodium

  2. Open MAC's Activity Monitor, find VSCodium in the processes and double-click:

    Active_Monitor

  3. After double-clicking, in the "Open Files and Ports" tab of the window, find the path corresponding to the first txt, which is the IDE executable path:

    Open_Files

  4. Copy the IDE executable path to the .env.local file:

perl
# .env.local
CODE_EDITOR=/Applications/VSCodium.app/Contents/MacOS/Electron

Windows System

Taking Webstorm as an example (steps are the same for other IDEs), to get the IDE executable path on Windows system:

  1. Find the IDE shortcut (create one if it doesn't exist), right-click the shortcut, select "Properties":

  2. After opening, in the "Shortcut" tab find "Target", remove the quotation marks from the "Target" to get the IDE executable path:

  3. Copy the IDE executable path to the .env.local file:

perl
# .env.local
CODE_EDITOR=D:\webstorm\WebStorm 2023.1.3\bin\webstorm64.exe