visual-studio-code

Adding PSCustomObject to Array gives Error, but works fine when debugging the code in Visual Studio Code

自作多情 提交于 2021-01-29 12:06:57
问题 When reading data from a CSV file and then trying to add a new custom object to the list I get an error when running the script, but when I try to debug the code I works as intended, and I can't figure out why it does work in debug mode, but not when run normally. $global:scanTime = Get-date $script:logfile_Database = Import-Csv -Path "${logSpace}\${CSV_logfileData}" -Delimiter ";" $currentLogfile = Get-ChildItem -Path "$($logfile.Path)\$($logfile.FileName)" -ErrorAction Stop $logfile_Data =

How to change the color of “closing tag” or “matching bracket / parenthesis” highlight color?

丶灬走出姿态 提交于 2021-01-29 11:51:05
问题 When Visual Studio Code can tell what parenthesis or bracket is related to the one you are near, it draws a white box around both of them: or like this: I find this color too bright and distracting, making it messy to read when there is a lot of nesting, etc. Can this color be changed? I don't even know what to call it and thus can't find a setting to turn it off or on, or change the color. Does anyone know what this is called? 回答1: You have two options for the matching bracket:

Vscode extension, setting window.activeTextEditor

旧街凉风 提交于 2021-01-29 11:26:51
问题 How can I use the vscode extension api to set the activeTextEditor ? The reason I need this is because my extension depends on an external call to extension B, and extension B does not take an argument for editor. It just looks at vscode.window.activeTextEditor . My extension is a webview which calls Extension B when something is clicked on the webview. At that moment in time, the 'active tab' is the webview, which is not activeTextEditor that I want. I want to do something like vscode.window

How to solve Exception Error: FirebaseApp with name [DEFAULT] doesn't exist?

喜你入骨 提交于 2021-01-29 11:24:54
问题 Here is where the exception is happening: @override Future<FirebaseUser> getCurrentUser() async { FirebaseUser user = await _firebaseAuth.currentUser(); return user; } The exact error is: Exception has occurred. PlatformException (PlatformException(error, FirebaseApp with name [DEFAULT] doesn't exist. , null)) My Flutter Doctor Output: [flutter] flutter doctor -v [√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.17763.914], locale en-US) • Flutter version 1.12

Configuration for Debugging Mocha Unit Tests in Vue.js with VSCode

一个人想着一个人 提交于 2021-01-29 10:55:39
问题 I am currently facing some problems getting my tests to debug properly with VSCode in Vue.js (I am using Mocha and Webpack) The first configuration I found which got me a bit closer was this one. Configuration in .vscode/launch.json { "type": "node", "request": "launch", "name": "Unit Tests", "program": "${workspaceFolder}/node_modules/@vue/cli-service/bin/vue-cli-service.js", "args": [ "test:unit" ], "console": "integratedTerminal", "internalConsoleOptions": "neverOpen" } Now this solution

Vscode terminal doesnt display folder and branch

前提是你 提交于 2021-01-29 10:52:29
问题 Following is how I see the termial: Vscode for some reason does not display the folder name and git branch by default. I have vscode on another system with no custom settings made and it displays them plus the colours as well. vscode settings: { "workbench.colorTheme": "Monokai Dimmed", "workbench.iconTheme": "material-icon-theme", "terminal.integrated.copyOnSelection": true, "terminal.integrated.cursorBlinking": true, } 回答1: The folder name and branch in the terminal prompt come from the

Create new untitled file and set language mode

寵の児 提交于 2021-01-29 10:51:51
问题 I have this macro "macros": { "newScratchFile": [ "workbench.action.files.newUntitledFile", "workbench.action.editor.changeLanguageMode" ] }, Which used to work great with this extension but it appears Microsoft broke it as some point in time. Now when I activate it, I do get a new untitled file, and the language mode popup opens for a split second but then disappears before I get a chance to type anything. Is there a way to fix my macro so the language picker remains open? 回答1: I'm sorry to

How do I activate my virtual environment in Windows?

帅比萌擦擦* 提交于 2021-01-29 10:50:48
问题 I'm using VSC and trying to activate my virtual environment through its terminal. I've navigated to the project folder in terminal and ran: virtualenv ll_env which seems to successfully create the virtual environment. Now I tried to run ll_env/bin/activate and ll_env\Scripts\activate.bat to activate it but doesn't seem to do anything. Supposedly when I have activated it I'm supposed to see (ll_env)learning_log in terminal. Please help. I've attached a screenshot as well. 回答1: Use the

Visual Studio Code: Remote-SSH connect to Windows Server 2019

只愿长相守 提交于 2021-01-29 10:31:11
问题 I've set up my VSCode Insider to connect th a Windows 2019 Server via the Remote-SSH extension. Is it correct, that I need a WSL installed so that it can set up the VSCode-Server and then it is running within the WSL distro when I'm connected? I thought it would run on Windows instead. 回答1: The stable VS Code 1.40 release does not support for Windows ssh hosts: https://code.visualstudio.com/docs/remote/ssh#_remote-ssh-limitations This feature is still experimental and only enabled in VS Code

How to paste a multiline selection as an aligned straight column after lines of varying length?

独自空忆成欢 提交于 2021-01-29 10:26:27
问题 My source file looks like 123456789 456 789 and I want to paste the following text appending to the end of the each line abcd efgh hijk the desired output should be as follow (which can be done in ultraedit) 123456789 abcd 456 efgh 789 hijk but with vscode I can only get 123456789 abcd 456 efgh 789 hijk Can anyone can show me how? 回答1: Using my answer from Pad selected lines to cursor position in VSCode but using a smaller number, like 10. from within the macro at the link modify the