vscode离线安装插件

背景:项目工程使用内网,无法使用互联网直接安装,只能通过离线安装

1、vue语法高亮vetur插件

2、代码修改记录Gitlens插件

插件下载地址:Extensions for Visual Studio family of products | Visual Studio Marketplace

下载好插件,在vscode安装目录,

windows系统查询vscode安装目录命令

复制代码
where code

在bin目录下执行命令

复制代码
# xxx.visx 是插件包的名称加后缀
code --install-extension xxx.visx

遇到问题

1、安装成功,但是工程不起作用

原因:使用的vscode版本不支持当前插件,需要下载低版本的插件

2、插件没有下载按钮

方法一:f12,在面板console执行js代码

复制代码
    //--------------------------marketplace.visualstudio.com----download-------------------------------//
    let vsMarketDownloader = (function () {
        return {
            addDownloadBtn: function () {
                if (window.location.host.toUpperCase() !== 'MARKETPLACE.VISUALSTUDIO.COM') return false;
                let arr = window.location.href.split('?')[1].split('=')[1].split('.');
                let author = arr[0];
                let id = arr[1];
                var histories = document.querySelectorAll('tr.version-history-container-row');
                for (var i = 1; i < histories.length; i++) {
                    let version = histories[i].firstChild.textContent;
                    let a = document.createElement('a');
                    a.className = 'bowtie-icon bowtie-install';
                    a.style = 'margin-left: 1rem;'
                    a.href = `https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${author}/vsextensions/${id}/${version}/vspackage`;
                    histories[i].firstChild.appendChild(a);
                }
                return true;
            }
        }
    })();
    setTimeout(() => {
        vsMarketDownloader.addDownloadBtn();
    }, 1200);

方法二:在git下载GitLens离线插件安装 vscode(无download extension选项)_gitlens插件下载-CSDN博客

相关推荐
8***v25710 小时前
SpringBoot + vue 管理系统
vue.js·spring boot·后端
tsumikistep10 小时前
【前后端】Vue 脚手架与前端工程结构入门指南
前端·javascript·vue.js
华仔啊11 小时前
Vue3 + Element Plus 动态菜单实现:一套代码完美适配多角色权限系统
前端·vue.js
慧慧吖@11 小时前
关于在本地去模拟生产环境检测页面内容注意事项
前端·javascript·vue.js
黄团团11 小时前
Vue2整合Electron开发桌面级应用以及打包发布(提供Gitee源码)
前端·javascript·vue.js·elementui·electron
独角仙梦境13 小时前
同事:架构太复杂了,源码文件找半天。 我:源码溯源了解一下?
前端·vue.js
我叫张小白。13 小时前
Vue3 路由:单页面应用的核心引擎
前端·javascript·vue.js·前端框架·vue3
猫头虎-前端技术14 小时前
小白也能做AI产品?我用 MateChat 给学生做了一个会“拍照解题 + 分步教学”的AI智能老师
前端·javascript·vue.js·前端框架·ecmascript·devui·matechat
前端加油站14 小时前
使劲折腾Element Plus的Table组件
前端·javascript·vue.js
十五喵14 小时前
智慧物业|物业管理|基于SprinBoot+vue的智慧物业管理系统(源码+数据库+文档)
java·前端·数据库·vue.js·spring boot·毕设·智慧物业管理系统