visual-studio-code

Why does my first Hello World Java program give an error on Visual Studio when using System.out to print to screen? [duplicate]

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-05 11:08:58
问题 This question already has an answer here : How to disable SonarLint for test projects (1 answer) Closed 5 months ago . I'm using Visual Studio Code on my Mac laptop and I'm after writing my first program in Java but when I run the code I get an error message about System.out. public class Hello { public static void main(final String[] args) { System.out.println("Hello, World!"); } } "Replace this use of System.out or System.err by a logger." How can I fix this error? 回答1: This is a sonarlint

Why does my first Hello World Java program give an error on Visual Studio when using System.out to print to screen? [duplicate]

China☆狼群 提交于 2021-02-05 11:04:02
问题 This question already has an answer here : How to disable SonarLint for test projects (1 answer) Closed 5 months ago . I'm using Visual Studio Code on my Mac laptop and I'm after writing my first program in Java but when I run the code I get an error message about System.out. public class Hello { public static void main(final String[] args) { System.out.println("Hello, World!"); } } "Replace this use of System.out or System.err by a logger." How can I fix this error? 回答1: This is a sonarlint

Is there a way to turn off hover for certain functions in VSCode?

别来无恙 提交于 2021-02-05 09:45:33
问题 In VSCode, I have the hovers enabled that show me the docstrings of the functions (etc.) I use. I appreciate that functionality. However, some of the hovers get annoying with time. First and foremost, the one for print . I never need it, and it is huge. It is particularly annoying in Jupyter notebooks, where I use print quite often. Hence, my question: Is there a way to disable the hover for certain functions specifically? I have looked through the VSCode documentation but haven't found

How to hide or collapse all javascript console.log lines in VSC

安稳与你 提交于 2021-02-05 09:24:51
问题 Lots of logging is very helpful to me. However, sometimes I would like to temporarily reduce the clutter of code that I'm editing in VSC by hiding, collapsing, or reducing the opacity of the font of console.log , console.warn , and console.error lines in javascript, Vue, React, etc. How could I accomplish my goal? I'd love if there were some way to easily toggle the feature on/off. 回答1: Thank you so much to @rioV8, who pointed me to the answer. This seems to work for me when using extension

How to hide or collapse all javascript console.log lines in VSC

本小妞迷上赌 提交于 2021-02-05 09:24:09
问题 Lots of logging is very helpful to me. However, sometimes I would like to temporarily reduce the clutter of code that I'm editing in VSC by hiding, collapsing, or reducing the opacity of the font of console.log , console.warn , and console.error lines in javascript, Vue, React, etc. How could I accomplish my goal? I'd love if there were some way to easily toggle the feature on/off. 回答1: Thank you so much to @rioV8, who pointed me to the answer. This seems to work for me when using extension

VS Code Terminal Not Allowing Typing

二次信任 提交于 2021-02-05 08:04:53
问题 My VS code terminal was working fine, until one day when I tried to work on a project, that was still open in VS code, my terminal didn't allow me to type any commands. I couldn't type anything. This is the screen that I get. 回答1: Okay, for those of you struggling with the same problem, I've managed to solve it by clicking on the drop-down menu that says powershell and changing it to cmd . 回答2: For me, I tried using Powershell/CMD/Bash and I was having errors/blank terminal. I found typing

VSCode Typescript No Intellisense

旧城冷巷雨未停 提交于 2021-02-05 08:01:52
问题 Have Typescript installed globally.. tsc --version // Version 3.8.3 There is no Typescript "version" in the bottom bar of VSCode. "> Select TypeScript Version" from the command palette is blank. In setting typescript tsdk is NOT there. Not getting any Intellisense for Typescript. How do I get this work? 来源: https://stackoverflow.com/questions/61685145/vscode-typescript-no-intellisense

How to pass comma-separated options to the g++ linker with VSCode?

喜夏-厌秋 提交于 2021-02-05 07:49:07
问题 I need to pass the arg -Wl,-Bstatic,--whole-archive to g++. "version": "2.0.0", "tasks": [ { "type": "shell", "label": "shell: g++.exe build active file", "command": "C:\\MinGW\\x86\\bin\\g++.exe", "args": [ "-g", "${file}", "-Wl,-Bstatic,--whole-archive", "-Xlinker", "-Map=${fileDirname}\\${fileBasenameNoExtension}.map", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe" ], "options": { "cwd": "C:\\MinGW\\x86\\bin" }, "problemMatcher": [ "$gcc" ], "group": "build" } ] } It gives me in

Flutter hot reload doesn't work on autosave in VSCode

我的未来我决定 提交于 2021-02-05 07:48:43
问题 Flutter hot reloads every time VS Code auto-saves my project before. A few hours ago, I started experiencing this issue where auto-saving doesn't hot-reload my app. Pressing Ctrl+S manually triggers hot reload but auto-saving does not. I've tried re-installing VS Code and Flutter SDK but the problem still exists. My newly installed VS Code only has the following extensions and settings: Dart: v3.19.1 Flutter: v3.19.0 Auto-save is set to afterDelay of 1000ms How do I hot reload when autosaving

VS Code: local variables not showing correctly

为君一笑 提交于 2021-02-05 07:20:44
问题 Sorry if this has been asked before, but I don't get the previous given answers. I'm new to VS Code and know a bit of c++ coding. I tried the tutorial for windows/mingw : https://code.visualstudio.com/docs/cpp/config-mingw#_step-through-the-code and done everything so far. The sample code has been build and I want to debug now, but my variables view is showing something different when stepping through the application when debugging. (see attached image) The word should contain any of the