Questions tagged [vscode-extensions]

Use this tag for questions about the Visual Studio Code Extension API and extension development. Questions only about extension usage should use the [visual-studio-code] tag instead.

Questions about the Visual Studio Code (VSCode) Extension API and extension development. Questions only about extension usage should use the [visual-studio-code] tag instead.

If you have a question about extension development that isn't a good fit for the Stack Exchange model, use the VS Code Dev Community Slack channel where extension developers help each other out and you can ask questions and find support.

4227 questions
20
votes
3 answers

How to find missing Await on Async function calls in Node+Typescript+VSCode?

We've deployed bugs in our node app b/c we forgot to prefix async function calls with "await". Example: const getUsers = async () => db.query('SELECT * from Users'); const testMissingAwait = async () => { const users = getUsers(); // <<< missing…
20
votes
2 answers

VSCode Private Extension Repository for teams

I'm writing highly specific private VSCode extensions for our dev team. I will be making constant changes to these extensions. From what I've read, the only way is to compile the extension as a .vsix file and send this file to each of the team. This…
MickRip
  • 312
  • 1
  • 2
  • 10
20
votes
2 answers

How can I customize comment block characters in Visual Studio Code?

I created a language extension for Visual Studio Code and I would like to change the comment block characters, but I couldn't find a way to do so.. How can I do it?
André Junges
  • 5,297
  • 3
  • 34
  • 48
19
votes
2 answers

How can VS Code be configured to run and debug with IIS Express and ASP.NET core?

I have been able to run ASP.NET core applications with Visual Studio 2017. Visual Studio has the integration of IIS Express and ASP.NET core all setup and it works with F5. I would like to get this same functionality in VS Code. I have found and…
19
votes
1 answer

Is it possible to call commands between extensions in VSCode?

For example, there are two VSCode extensions: extension1 has registered command exCommand1 extension2 has registered command exCommand2 According to documentation, a VSCode extension can call commands (ref:…
gyeongseok seo
  • 331
  • 2
  • 10
18
votes
3 answers

How to open browser from Visual Studio Code API

I am just exploring a way in order to open the default browser from Visual Studio Code API used for developing extensions. Following is my code : var disposable = vscode.commands.registerCommand('extension.browser', () => { // The code you place…
Shan Khan
  • 9,667
  • 17
  • 61
  • 111
17
votes
5 answers

Auto run command from vscode extension on file save

I can I auto execute 2 separate commands upon file saving in VS Code? I want the two commands to do the following:     1. Format the document in focus     2. Sort the documents Imports
Callum OKane
  • 405
  • 1
  • 4
  • 12
17
votes
5 answers

VSCode extension - how to alter file's text

I have an extension that grabs the open file's text and alters it. Once the text is altered, how do I put it back into the file that is displayed in VSCode? // this method is called when your extension is activated // your extension is activated…
DFBerry
  • 1,818
  • 1
  • 19
  • 37
17
votes
2 answers

How to debug Visual Studio Code extensions?

What are the best ways to troubleshoot and debug Visual Studio Code? I have encountered conflicts in some snippet/suggestion extensions while editing in Visual Studio Code and want to try to find the root cause. P.S. I would appreciate any…
mittens pair
  • 880
  • 1
  • 7
  • 17
16
votes
9 answers

Failed to connect. Is Docker running? (Vs Code)

I get this error in Ubuntu in vscode and I can't see my images in vscode. I run sudo docker ps -a and everything is OK on terminal! What should I do to solve this problem?
Milad
  • 335
  • 1
  • 2
  • 13
16
votes
4 answers

How to install VS Code extensions in a Dockerfile?

Is there a way to install VS Code extensions in a Dockerfile?
16
votes
4 answers

How to investigate VS Code taking 30% of CPU although it is supposed to do nothing

My CPU is oscillating between 20 and 30% usage for CPU usage based on Windows Task manager. it is occurring for several hours now. I expect this VS Code instance to do nothing. How can I investigate what is going wrong? I tried to open "Developer:…
Aurélien Pupier
  • 724
  • 1
  • 8
  • 23
16
votes
2 answers

How to close TextDocument in VS Code?

I'm writing vscode extension. I opened a TextDocument with vscode.window.showTextDocument, and want to close it later. But I can't find api to close it. Finally I found this commit, it removed closeTextDocument. What should I do now?
blackmiaool
  • 5,234
  • 2
  • 22
  • 39
16
votes
2 answers

How to change ctrl + tab on VSCode to tab between tabs like a browser does?

I hate those "last used" tabs things. I just want to go left/right in VSCode.
corysimmons
  • 7,296
  • 4
  • 57
  • 65
16
votes
4 answers

When folding a line in VS Code is it possible to override the indentation and choose which lines are included in that fold?

Is it possible to customize the way code folding works in Visual Studio Code? I use a common pattern of defining regions of code across a variety of different document types. So, for XML I wrap sections of text with and