I have a lot of scripts I want to run / debug from Webstorm, but for each I have to go thru the process of "Run > Edit Configurations" and add a new configuration mapped to each file.
Is there a variable / shortcut to tell WebStorm to run / debug currently opened file?
Something like ${opened-file}
would be great to have a Run Configuration "template".
Thanks.
Start debugging If your application is running in the development mode on localhost , you can start debugging it from the built-in Terminal ( Alt+F12 ), from the Run tool window, or from the Debug tool window. Just hold Ctrl+Shift and click the URL at which the application is running.
To run a script, open it in the editor or select it in the Project tool window, and then select Run <script file name> from the context menu. WebStorm creates a temporary run/debug configuration of the type Node. js. To run a test, click the gutter icon next to it or press Ctrl+Shift+F10 .
Start debuggingOpen the HTML file that references the JavaScript to debug or select the HTML file in the Project tool window. From the context menu of the editor or the selection, choose Debug <HTML_file_name>. WebStorm generates a debug configuration and starts a debugging session through it.
Application parameters
has a macros support (plus icon in the field). You need to use $FilePathRelativeToProjectRoot$
macros.
This example runs node /node_modules/.bin/wdio wdio.local.conf.js --spec foo.js
. foo.js
is $FilePathRelativeToProjectRoot$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With