visual-studio-code

npm not found from Visual Studio code terminal

北战南征 提交于 2021-01-27 17:39:38
问题 When I try to run "npm" from VS Code terminal, I get the error "The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program." This used to work in my previous laptop, so it seems I'm missing a configuration or extension? 回答1: Please read the documentation on how to install npm and node on your machine: https://code.visualstudio.com/docs/nodejs/nodejs-tutorial 来源: https://stackoverflow.com/questions/49752254/npm-not-found-from-visual-studio-code

VS Code: how to make a python snippet that after string or expression hitting tab will transform it

妖精的绣舞 提交于 2021-01-27 17:35:09
问题 is it possible to make a python snippet that transforms code like i explain in my example? "Hello world".print - hit tab transforms it into print("Hello world") it will be nice if automatically understand is it string or expression so if i make a variable for example "a" and i write ".print" at the end and hit tab it will not add " " or ' ' so in that way it will not convert it in something else. a = 10 a.print - hitting tab transforms it into: print(a) not into: print("a") Progress ( if it

git push origin master Missing or invalid credentials

走远了吗. 提交于 2021-01-27 17:08:55
问题 Cannot push anymore to origin master, git push origin master , since a few days, I have uninstalled git and Visual Code and reinstalled it but nothing, I'v got same error : Missing or invalid credentials. Error: socket hang up at connResetException (internal/errors.js:559:14) at Socket.socketOnEnd (_http_client.js:433:23) at Socket.emit (events.js:208:15) at endReadableNT (_stream_readable.js:1168:12) at processTicksAndRejections (internal/process/task_queues.js:77:11) { code: 'ECONNRESET' }

Where are Automatic Type Acquisition typescript definition files saved?

冷暖自知 提交于 2021-01-27 14:34:34
问题 I'm in environment with blocked access to github, typing and I want to have enhanced intellisense in vscode. To do so I suppose I need to copy cached typescript definitions from machine that does have it for various needed npm packages. So question where I can find those cached ata ts files? 回答1: Please consider an alternative, but here are the standard locations: Mac: ~/Library/Caches/TypeScript Windows: %LOCALAPPDATA%\Microsoft\TypeScript Linux: ~/.cache/typescript/ As a better solution, if

Input functionality is not working with python in Vscode

狂风中的少年 提交于 2021-01-27 13:11:57
问题 Description: I'm using Vscode Studio for python coding, I've installed every extension related to python and I wanna use Jupyter. I'm experiencing no problem with importing packages or running code but when I try to grab the input from the user it throws me an error stating 'StdinNotImplementedError: raw_input was called, but this frontend does not support input requests.' which I don't find using the console. [ Image Error ] https://i.stack.imgur.com/BDUC5.jpg Error StdinNotImplementedError

Input functionality is not working with python in Vscode

旧巷老猫 提交于 2021-01-27 13:00:24
问题 Description: I'm using Vscode Studio for python coding, I've installed every extension related to python and I wanna use Jupyter. I'm experiencing no problem with importing packages or running code but when I try to grab the input from the user it throws me an error stating 'StdinNotImplementedError: raw_input was called, but this frontend does not support input requests.' which I don't find using the console. [ Image Error ] https://i.stack.imgur.com/BDUC5.jpg Error StdinNotImplementedError

How do I determine which VS Code extension is causing a crash?

最后都变了- 提交于 2021-01-27 12:54:31
问题 Context I'm using VS Code in a fairly large repo and my extension host keeps crashing. When I run the editor with extensions disabled I'm able to work without interruption. During these times VS Code is using the vast majority of my machines CPU. Question Is there a way for me to inspect which extension is the culprit causing the crashes? 回答1: There is a new feature coming in v1.52 - Extension Bisect - which could help with determining which extension is causing an issue. See https://github

How to add an App.Config in Visual Studio Code?

余生颓废 提交于 2021-01-27 12:29:39
问题 How to configure a C# program with a connection string in Visual Studio Code? This is for .Net Core 2.2 using .Net Core SDK version 2.2.203 in Visual Studio Code 1.34.0 I have tried to add App.Config file to the project, but I'm not able to resolve this issue. Do let me know any solution to configure connection string. using System; using System.Collections.Generic; using System.Data; using System.Data.Common; using System.Data.SqlClient; using System.Linq; using System.Web; using System

How to add gtk lib in Visual studio code?

女生的网名这么多〃 提交于 2021-01-27 12:22:26
问题 I try to add gtk library to my file in Visual Studio code on my Arch Linux ,but it underlines "#include line and writes: #include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/home/mikhailkhr/My projects/C projects/Test/Test.c). cannot open source file "glibconfig.h" (dependency of "gtk/gtk.h") It does compile this file with: gcc `pkg-config gtk+-3.0 --cflags` ProgName.c `pkg-config gtk+-3.0 --libs` But why does it underline this? And how

How to focus a custom view when writing a VS Code extension?

左心房为你撑大大i 提交于 2021-01-27 07:27:40
问题 I need help with my VS Code extension. I've written a custom view which works just fine, however I'd like to activate / focus / bring into view that view by using a keyboard shortcut or a context menu command. I am unable to find how to use the VS code API to achieve that. context.subscriptions.push(vscode.commands.registerCommand('extensionId.showView', () => { // how to do that? })); I know this can be done, because one can display the file explorer by using this code snppet: vscode