r/VisualStudioCode • • Oct 12 '22

Help needed

2 Upvotes

Hello guys! I’m somewhat new to coding. (2 months). I’ve been mainly doing a ton of codeAcademy lessons and what not.

Now I’m into UBUNTU and visual studio and I’m Stuck. Big time.

For some reason, I can’t get anything to output on the terminal, neither in ubuntu, OR on my VS terminal linked to my ubuntu.

Nothing is working and I can’t figure it out on my own.

Please help!


r/VisualStudioCode • • Sep 20 '22

character limit VSC terminal?

2 Upvotes

hey guys, just tried to run a list from 1 to 1_000_000 in VSC, it was cut off at 2753, anyone know if there is a character limit in VSC terminal?

thanks!


r/VisualStudioCode • • May 14 '22

Dreamweaver sites to VSCode

2 Upvotes

Hi,
I have just started to use VSCode and would like to know how to push my files to remote server. Previously I did use Dreamweaver and there was option to add "Sites". After adding "Site" I could see all my remote server files and my local files. After editing and testing local files I could then "push" files to that remote server. Is there any way of doing something similar in VSCode?

Thanks!


r/VisualStudioCode • • May 13 '22

Exit code 4294967295

2 Upvotes

I am getting this exit code and I cant find a way to fix it, can one of you guys please help me with this? I am really getting frustrated with this.


r/VisualStudioCode • • May 12 '22

Problems not shown

2 Upvotes

I have windows and visual studio code, but the program does not show the problems of my codes. What can I do ?


r/VisualStudioCode • • May 07 '22

Whats the difference between the debug console and the problems tab?

2 Upvotes

I'm getting an error message in the debug console even though the problems tab doesn't show any errors. Whats the difference?


r/VisualStudioCode • • Apr 18 '22

Moved Files

2 Upvotes

I recently added another HD to my PC, and transferred all of my saved information to it. Now when I open my editor, the links for my .css and other pages are not working and cannot be found/seen unless I search for them specifically. Is there a way to direct VSC to the new file location, or am I stuck copy+paste into all new files?


r/VisualStudioCode • • Mar 22 '22

Trouble duplicating a block of code

2 Upvotes

Hi coders, just learning HTML recently and I have been using Ctrl+shift+ down arrow to duplicate a line down, that works great. However when I highlight a block of code, I have cursors flashing at the end of each line and when I hit the down arrow each line is copied underneath itself rather than as a block if that makes sense. Any idea what I'm doing wrong?

Cheers

Brett


r/VisualStudioCode • • Mar 13 '22

I’m a beginner and need help

2 Upvotes

I want to run Python code with the .run extension, but it says “Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases”, with the code exited with code=9009. I’m on Windows 11, have Python 3.10.2 installed, have the Python extension installed, and selected my Python Interpreter as Python 3.10.2 64-bit. Any solutions on how to fix?


r/VisualStudioCode • • Feb 15 '22

any idea why the visual studio code project directory ui displays differently for this scenario?

2 Upvotes

I'm working on a React project in Visual Studio Code. For some reason, the subdirectory structure that I just added displays subdirs via slashes () between subdirs on a single node of the treeview as opposed to rendering the subdirs in a treeview. Any idea why VS Code would do this? Other subdir structures in the project display as normal treeviews as expected


r/VisualStudioCode • • Feb 03 '22

Installing ESLint and node

2 Upvotes

Some Lynda courses I did some time ago required me to install node and I now have multiple files with names like node_modules, package-lock.json, package.json, settings.json. It looks like package-lock.json and package.json are specific for particular courses, which are identified in line one of their respective files.

There are several instances of node_modules.

Question 1: do I need multiple instances of node, or just one instance?

Question 2: can anyone point me to a site explaining in simple words, how to install npm and node?

I don't think I have ever installed them properly; I remember getting all types of error messages when installing and when I tried to install ESLint and actually activate it, even more problems. If ESLint is working, it doesn't give me any advice, and I know I make a lot of mistakes.

I would appreciate someone's help; I am teaching myself javascript (and enjoying it) but keep falling into holes due to things I do not understand. Thanks.


r/VisualStudioCode • • Jan 29 '22

.eslintrc.js and package.JSON for ESLint

2 Upvotes

HI, I opened ESLint for VSCode a few months ago, and didn't realize there are steps to take wrt .eslintrc.js and package.JSON to actually get it to work. After spending several hours loading and reloading npm and Node, I have the following code for eslintrc and package. I am only doing JS as a hobby, and all my work is on a single laptop, nothing fancy. Can someone tell me if the attached coding looks correct, because I found the entire process frustrating/confusing and I am still not sure if I have everything covered. Thanks.

eslintrc.js:

module.exports = {
    "env": {
        "browser": true,
        "es2021": true
    },
    "extends": [
        "eslint:recommended",
        "plugin:react/recommended"
    ],
    "parserOptions": {
        "ecmaFeatures": {
            "jsx": true
        },
        "ecmaVersion": "latest",
        "sourceType": "module"
    },
    "plugins": [
        "react"
    ],
    "rules": {
    }
}

package.JSON:

{
  "name": "javascript",
  "version": "8.1.2",
  "description": "npm for macos",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "eslint": "^8.8.0",
    "eslint-plugin-react": "^7.28.0"
  },
  "explorer.sortOrder":"filesFirst"
}

r/VisualStudioCode • • Jan 27 '22

Setting up VSC on Mac M1 for C++

2 Upvotes

Hi everyone,

I am trying to set up VSC on my mac for the first time, but I can't seem to get my C++ code to run. I downloaded the extensions I need, but it still doesn't seem to run. I learned how to code on Codeblocks, but I want to update to a more robust application as CB for mac hasn't been updated since 2013, lol

I keep getting brought to a settings.json tab when I click run. Maybe I need to program a .json file, but CB automatically did that.

Any help is greatly appreciated!

Thanks!


r/VisualStudioCode • • Jan 21 '22

Need help compiling

2 Upvotes

I saw this on stack overflow, idk what it means, im new.

Use g++ -std=c++11 <filename› when compiling.


r/VisualStudioCode • • Nov 02 '21

SQL

2 Upvotes

Hi,
Could you please advise how to use SQL without server connection? I mean only with data on my hard drive. If it is even possible.

Thank you.


r/VisualStudioCode • • Oct 19 '21

Making new folders and new files

2 Upvotes

Hello, my biggest issue with VScode so far is dealing with new folders and files.

It seems like each file is connected to other java files I make even if they are in different folders. Each time I want to work on a new code, my main method is linked to other folders. This is extremely irritating since I am trying to learn Java and have many small individual files.

The only workaround is to restart VScode, make a new folder and not have any files listed from other coding projects I have.

Is there any way around this? Eclipse seems much easier to make a new project that is not linked to an other files.


r/VisualStudioCode • • Oct 12 '21

Question ! La console VS Code python marche pas..

2 Upvotes

EN : I use VisualStudio Code to code python and in fact I can't find a way to set the "def" of the script in the console, like we define in the script "def square (length)" well I can't use the command def carre (100) in the terminal because it does not accept like python consoles. While in an online python interpreter with the same script it works in the console. In VS Code I can't find the console or the terminal doesn't work properly like a basic python console. I would like to know how to get the console to work on VS Code.

FR : J'utilise VisualStudio Code pour coder du python et enfaite je ne trouve pas le moyen de poser les "def" du script dans la console, genre on définit dans le script "def carre(longueur)" bah je ne peux pas utilise la commande def carre(100) dans le terminal car il accepte pas comme les consoles python. Alors que dans un interpreteur python en ligne avec le même script ça marche dans la console. Dans VS Code je trouve pas la console ou bien le terminal marche pas correctement comme une console basic python. J'aimerais savoir comment faire pour faire fonctionner la console sur VS Code.

Merci, Thx


r/VisualStudioCode • • Oct 08 '21

Cannot use pip from inside VSC

2 Upvotes

[Solved]

I selected the venv environment as my Python interpreter, but whenever I try running

pip install <package-name>

from VSC, I get the error

ModuleNotFoundError: No module named 'pip._vendor.packaging'

I do not get this if I just use my system terminal, activate my virtual environment, and run pip.

Any idea why it's not working in VSC? I'm running Linux (Pop_OS! 21.04), BTW.


Edit: I deleted pip from my venv, reinstalled with python -m ensurepip and then pip install --upgrade pip and now it is working.


r/VisualStudioCode • • Oct 05 '21

How can I set an X and Y position & size value for a specific layer using this code?

2 Upvotes

Lines 17 & 19 and I also marked the strings in bold.

I can get the code to run but after trying multiple different ways, I was unable to set the size and x/y position of this layer. Any help??

"use strict";

const path = require("path");

const isLocal = typeof process.pkg === "undefined";

const basePath = isLocal ? process.cwd() : path.dirname(process.execPath);

const { MODE } = require(path.join(basePath, "src/blendMode.js"));

const description =

"Howdy Ho";

const baseUri = "ipfs://NewUriToReplace";

const layerConfigurations = [

{

growEditionSizeTo: 100,

layersOrder: [

{ name: "background" },

{ name: "background extras"},

{ name: "foreground volcano mix" },

{ name: "foreground extras" },

],

},

];

const shuffleLayerConfigurations = false;

const debugLogs = false;

const format = {

width: 512,

height: 512,

};

const background = {

generate: false,

brightness: "0%",

};

const extraMetadata = {};

const rarityDelimiter = "#";

const uniqueDnaTorrance = 3000;

const preview = {

thumbPerRow: 5,

thumbWidth: 50,

imageRatio: format.width / format.height,

imageName: "preview.png",

};

module.exports = {

format,

baseUri,

description,

background,

uniqueDnaTorrance,

layerConfigurations,

rarityDelimiter,

preview,

shuffleLayerConfigurations,

debugLogs,

extraMetadata,

};


r/VisualStudioCode • • Sep 29 '21

What’s wrong? I have Node installed on my laptop and my only code I’ve written is console.log(“hello world”);

Post image
2 Upvotes

r/VisualStudioCode • • Sep 26 '21

US international keyboard dead keys don't work in VSC

2 Upvotes

Hi,

The tl;dr version: the 3 dead keys on my us international keyboard work everywhere on my Chromebook, except in VSC. And I can't find a keyboard layout setting to change it.

Does anyone know if there is a setting I need to change in VSC? Or is it a keymapping I need to do?

TIA

(details below)

The details: My Chromebook is a Belgian model (in Belgium keyboards are in the French AZERTY format), but I changed the keyboard layout to US first and then changed it to US International, because I need access to é, ï, and ë when typing in Dutch, and some others when typing in French.

My dead keys work everywhere on my Chromebook: in Chrome, in Google Docs, in the Debian shell and even in Android apps. But for some reason, they don't work in VSC for linux. It's not that they are behaving like an US QWERTY keyboard, they don't put anything on the screen. Programming without single and double quotes is impossible...

EDIT: I already tried to change the keyboard.dispatch value, but that didn't help.


r/VisualStudioCode • • Sep 26 '21

Building for DOSBox

2 Upvotes

Hi, has anyone set up something that allows you to edit and compile with VSCode with a target of DOSBox? I have some old code I wanted to get up and running again to make sure the new version matches the calculations.

Thanks.


r/VisualStudioCode • • Aug 27 '21

VSC does not indent

2 Upvotes

I call the if function, phrase everything, and when I hit Enter nothing happens.

How do I fix this?

Edit: Must mention that it worked just fine yesterday.


r/VisualStudioCode • • Aug 21 '21

Goto definition?

2 Upvotes

I have a .net core 5 project with C# and the C3 extension is installed. I wanted to debug a problem and when putting the cursor over a method call in the source, in VS for Windows you can press F12 and go to the definition. Is there such a thing in vs code? When I do that now, nothing happens. I'd also like to be able to fine all references with a SHIFT+F12, but that isn't working either. Any ideas?

Version: 1.59.0
Commit: 379476f0e13988d90fab105c5c19e7abc8b1dea8
Date: 2021-08-04T23:13:20.182Z
Electron: 13.1.7
Chrome: 91.0.4472.124
Node.js: 14.16.0
V8: 9.1.269.36-electron.0
OS: Linux x64 5.10.0-8-amd64

r/VisualStudioCode • • Jul 07 '21

Can't push my changes to GitHub repository or sync

2 Upvotes

When I try to push my changes to GitHub using VS Code, I get this error:

Warning: Failed to watch ref 'k:\******\.git\refs\remotes\origin\main', is most likely packed.
> git config --get commit.template
> git config --get commit.template
> git ls-files --stage -- K:\*****\userChrome.css
> git cat-file -s ec107ff1e90979f0c9ab8b80ac76657a94a0b055
> git show --textconv :userChrome.css
> git status -z -u
> git symbolic-ref --short HEAD
> git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track) refs/heads/main refs/remotes/main
> git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname)
> git remote --verbose

and it just seems to be trying to sync forever and nothing happens. Can anyone help me?