visual-studio-code

VSCode extension Installation Dependency activation order

懵懂的女人 提交于 2021-01-28 06:47:33
问题 I have a VSCode extension which has an installationDependency in the package.json: "extensionDependencies": [ "publisher.packagename" ] this works well - it runs the activation event for the dependency before the one I have written as you would expect: export async function activate(context: vscode.ExtensionContext) {... however - I would like my extension to first reset an environment variable before the dependency activates. Is it possible to determine (in my case reverse) the order of

How to set up the Team Foundation Server repository in vs code?

僤鯓⒐⒋嵵緔 提交于 2021-01-28 06:32:40
问题 I'm using visual studio code version 1.26.1 for angular projects. Right now I'm using source control GIT. But I would like to change this to Team Foundation Server. So that I have installed the Visual Studio Team Services. Once after that, I have done the following things: Open File -> Preferences -> Settings Add the following lines to your user settings { "tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\Common7\\IDE\\CommonExtensions\\Microsoft\

Scoping of keys in vscode extension global scope

给你一囗甜甜゛ 提交于 2021-01-28 05:33:25
问题 The context of a vscode extension provides access to globalState which is a Memento object with key/value pairs. My question is: does each extension get its own memento object, or is there one shared by all extensions? Just wondering whether I need to make my keys more specific (e.g., my.extension.foo ), or if I can keep the keys simple (e.g., foo ). 回答1: It's scoped to your extension, so you can keep them simple: However, when an extension uses storage, it will always get it's data stored

VSCode: Tests won't proceed after using executeCommand to open a sample project

蹲街弑〆低调 提交于 2021-01-28 05:26:56
问题 I'm trying to add some unit tests to a Visual Studio Code extension I'm developing. I've followed the recipe for setting up extension testing described here: https://code.visualstudio.com/api/working-with-extensions/testing-extension This recipe, however, doesn't show anything useful being done to actually test an extension, just the skeleton for getting set up to do so. For the testing I want to do, one of the first things I want to do is open a sample project . And that's where I get stuck.

How do you view a function's documentation with Visual Studio Code's Intellisense?

蓝咒 提交于 2021-01-28 05:16:51
问题 I'm writing Javascript with Visual Studio Code on a Mac. I have this function, documented in JSDoc format: /** * Adds the passed Matter Body to the simulation. * @param {Matter.Body} body - The body to add to the physics simulation * @param {string} imageUrl - The URL of the image to use to represent this body in the simulation. It should match an image URL that has already been added via loadImages() * @param {function} [onCollide] - Optional function to call when this body collides */

How to fix “no such file or directory, lstat 'scss/'”?

大兔子大兔子 提交于 2021-01-28 05:08:16
问题 i'm trying to follow a simple tutorial on youtupe https://www.youtube.com/watch?v=gYzHS-n2gqU&t=900s where he is tring to run an npm scripts "sass" file using the tirminal. -When i execut the command npm run sass shows me an error message Error: ENOENT: no such file or directory, lstat 'scss/' -I think the problem with the path of file or permissions on the file , where should configure in way to looks in the correct director. - here is folder structure -When i replace the script with :

VSCode default Integrated Terminal is not changing

我的梦境 提交于 2021-01-28 05:08:15
问题 I'm using VSCode for some time now and until today the Terminal was working as expected. But now I can't change the default Integrated Terminal. It's allways "cmd" no matter what I set up in the settings. The settings.json seems to be fine: { "window.zoomLevel": -1, "files.associations": { "*.testset": "feature" }, "git.autofetch": true, "C_Cpp.updateChannel": "Insiders", "terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe" } But every new terminal is still "cmd". Not

Python 3: EOF when reading a line (Visual Studio Code)

纵饮孤独 提交于 2021-01-28 04:11:33
问题 I use visual studio code to program in Python, and whenever I try to take user input, Visual Studio Code throws me an "EOF when reading a line" at that specific line. However, this code works perfectly in command line and Python IDLE. Side note: Python 3: EOF when reading a line (Sublime Text 2 is angry) is possibly a related question, as the error I am facing seems quite similar, only I am receiving this error in VSC and not Sublime text 2. I think this might be because VSC has no valid way

How do I create a file for a Visual Studio Code Extension?

泪湿孤枕 提交于 2021-01-28 02:50:48
问题 I'm trying to create a file as a part of one of the commands in my extension and can't seem to get it right. let wsedit = new vscode.WorkspaceEdit(); const file_path = vscode.Uri.file(value + '/' + value + '.md'); vscode.window.showInformationMessage(file_path.toString()); wsedit.createFile(file_path, {ignoreIfExists: true}); vscode.workspace.applyEdit(wsedit); vscode.window.showInformationMessage('Created a new file: ' value + '/' + value + '.md); value is a string input from the user. The

How to access Nuget repository from .NET Core using Visual Studio Code

拜拜、爱过 提交于 2021-01-28 02:31:49
问题 I'm working on a .NET Core project with a friend and we're splitting the work as we see best. We're currently trying to configure a database application to communicate with so we need a database "driver" library. I've decided on MongoDB, and I've found this page which seems to suggest that the following code will configure our project somehow to use the library. Selecting .NET Core and Nuget (both of which I've installed locally and on our server), I get the following code which seems to be