Visual Studio Code is a IDE by Microsoft available on all platforms (Windows, Linux, MacOS).

I use it to develop in PHP, the extensions's system authorising the customisation of the IDE. You can install any availables extensions directly in VSCode, but you could want install with command line too.

A simple command is usable :

code --install-extension <extension.name>

For instance to install PHP Intellisense extension:

code --install-extension felixfbecker.php-intellisense

Naturally other actions are available by command line like list, update or remove a extension. All documentation is available here

Possible issue when you install a new extension with command line, you can have an error like this :

/usr/share/code/resources/app/out/vs/code/node/cli.js:57
;n>-1&&e.splice(n,1)}},t.arrayInsert=function(e,t,n){var r=e.slice(0,t),i=e.slice(t);return r.concat(n,i)}}),define(e[8],t([1,0,3,11,2]),function(e,t,n,r,i){"use strict";function o(e){s(e)||t.errorHandler.onUnexpectedError(e)}function s(e){return e instanceof Error&&e.name===c&&e.message===c}Object.defineProperty(t,"__esModule",{value:!0});var u={};i.TPromise.addEventListener("error",function(e){var t=e.detail,n=t.id;t.parent?t.handler&&u&&delete u[n]:(u[n]=t,1===Object.keys(u).length&&setTimeout(function(){var e=u;u={},Object.keys(e).forEach(function(t){var n=e[t];n.exception?o(n.exception):n.error&&o(n.error),console.log("WARNING: Promise with no error callback:"+n.id),console.log(n),n.exception&&console.log(n.exception.stack)})},0))});var a=function(){function e(){this.listeners=[],this.unexpectedErrorHandler=function(e){n.setTimeout(function(){if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}return e.prototype.addListener=function
Failed to watch /home/vincent/.config/Code/User for configuration changes (Error: watch /home/vincent/.config/Code/User ENOSPC)

Don't worry ! the correction of this error is very simple but you can lost a lot of time : Close every instance of VSCode.

Next Post Previous Post