Open files from the command line
Open an arbitrary file or folder in WebStorm from the command line, optionally specifying where to put the caret after opening.
- Syntax
- webstorm.bat [--line <number>] [--column <number>] <path ...>
- Examples
-
Open a project:
webstorm.bat C:\MyProjectOpen a specific file on line number 42 column 7:
webstorm.bat --line 42 --column 7 C:\MyProject\scripts\numbers.js
- Syntax
- webstorm --line <number> <path>
- Examples
-
Open a project:
webstorm ~/MyProjectOpen a specific file on line number 42 column 7:
webstorm --line 42 --column 7 ~/MyProject/scripts/numbers.js
- Syntax
- webstorm.sh --line <number> <path>
- Examples
-
Open a project:
webstorm.sh ~/MyProjectOpen a specific file on line number 42 column 7:
webstorm.sh --line 42 --column 7 ~/MyProject/scripts/numbers.js
When you specify the path to a file or directory in an existing project, WebStorm opens this project. If the file does not belong to a project, WebStorm creates a temporary project for it. If you open a directory that is not a part of a project, WebStorm adds the .idea directory to it, making it a project.
Last modified: 8 April 2020