Skip to content

Proxy support for npx gulp vsDebugServer #1955

@relief-melone

Description

@relief-melone

vscode-js-debug is being used in e.g. nvim. To make use of debugging it's dap plugin needs to build a vscode-js-debug instance. This works fine usually running

npx gulp vsDebugServerBundle

However it woll not work behind corporate proxies because in the gulp task l10n:bundle-download got is being used to fetch the vscode-loc repo. got does not nativly support proxy variables like https_proxy. Suggestion would be to add support with something like this (

const HttpsProxyAgent = require("hpagent").HttpsProxyAgent;
//...
gulp.task('l10n:bundle-download', async () => {
  const opts = {};
  const proxy = process.env.https_proxy || process.env.HTTPS_PROXY || null;
  if (proxy)
    opts.agent = {
      https: new HttpsProxyAgent({
        keepAlive: true,
	keepAliveMsecs: 1000,
	maxSockets: 256,
	maxFreeSockets: 256,
	scheduling: 'lifo',
	proxy
      })
    };
    
  const res = await got('https://github.com/microsoft/vscode-loc/archive/main.zip', opts).buffer();

  //...

if this finds acceptance I'd gladly submit a PR

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions