You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Npm Scripts explorer, setting to run by default instead of open? #49204
Similarly to this extension, would it be useful for some people to have a setting that by default, on click, run a task instead of opening it in the package.json?
Thanks!
Does this issue occur when all extensions are disabled?: Yes
Reacted by Michael De Abreu, Roman O and Chaitanya Saladi
Albino Tonnina (@albinotonnina) I´ve added an inline action that allows you to run a script on click (see below). I hope this covers your request, please try it in the latest insiders build.
Hello Erich Gamma (@egamma)! Thank you!
This solves the issue but I like #49282 even more :)
To be honest with you I don't know why the default click action should be 'open' in that panel.
To be honest with you I don't know why the default click action should be 'open' in that panel.
Initial user feedback was that it is too confusing to run a task on single click and the explorer should more behave like an outline and the single click is also consistent with the file explorer. We will also add support for a double click action and triggering a task on double click make sense to me.
Hello Erich Gamma (@egamma), thanks for your reply.
You would open on single click and run on dblclick? That would work I guess!
Wasn’t expecting that result from user feedback. I guess I’m used to the behaviour that the aforementioned plugin has, or webstorm.
Personally I would like to run tasks via double click on a task. However I do understand that some people prefer to open the config instead, thus my PR adding it as a configuration option.
I like the idea with the "run" button at the end of the line. It is only visible when you hover over the task. This type of interaction reminds me more of the "Edit Button" from the User Settings / settings.json.
Mockup Screenshot:
My suggestion would be to switch the two Buttons.
Depending on the task I would either display a "run" icon or the "debug" icon.
(if the task includes --inspect then debug as default)
With the current solution there would be no easy way to enter debug mode.
Maybe shift-lmb / ctrl-lmb on the run button to open in debug mode?
Activity
vscodebot commentedon May 4, 2018
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
albinotonnina commentedon May 4, 2018
Nope bot, doesn't look a dup to me but you know more 👍
egamma commentedon May 7, 2018
Albino Tonnina (@albinotonnina) I´ve added an inline action that allows you to run a script on click (see below). I hope this covers your request, please try it in the latest insiders build.
albinotonnina commentedon May 7, 2018
Hello Erich Gamma (@egamma)! Thank you!
This solves the issue but I like #49282 even more :)
To be honest with you I don't know why the default click action should be 'open' in that panel.
egamma commentedon May 8, 2018
Initial user feedback was that it is too confusing to run a task on single click and the explorer should more behave like an outline and the single click is also consistent with the file explorer. We will also add support for a double click action and triggering a task on double click make sense to me.
The PR looks good to me.
albinotonnina commentedon May 8, 2018
Hello Erich Gamma (@egamma), thanks for your reply.
You would open on single click and run on dblclick? That would work I guess!
Wasn’t expecting that result from user feedback. I guess I’m used to the behaviour that the aforementioned plugin has, or webstorm.
borgfriend commentedon May 8, 2018
Personally I would like to run tasks via double click on a task. However I do understand that some people prefer to open the config instead, thus my PR adding it as a configuration option.
I like the idea with the "run" button at the end of the line. It is only visible when you hover over the task. This type of interaction reminds me more of the "Edit Button" from the User Settings / settings.json.
Mockup Screenshot:

My suggestion would be to switch the two Buttons.
Depending on the task I would either display a "run" icon or the "debug" icon.
(if the task includes --inspect then debug as default)
With the current solution there would be no easy way to enter debug mode.
Maybe shift-lmb / ctrl-lmb on the run button to open in debug mode?
egamma commentedon May 30, 2018
Added a setting npm.scriptExplorerAction that can be set to either open and run. This should address this feature request.