My vs code python path has 2 different paths showing? one in white and one in blue - visual-studio-code

I am realizing the hardest part in learning to code is knowing how to even ask the right questions..
ill try and word it as best i can. I also will attach a screenshot.
I am running code in the terminal through VS code... and there is just so many files being shown every time i run the code. There is white and blue text that seems like the same thing? It makes it hard for me to see whats going on. Is there anyway to shorten or completely remove it? it seems 100% useless for just running some basic code.

The
C:/Program Files (x86)/Microsoft Visual Studio/shared/python37_64/python.exe
Is the Absolute path of the python executable.
And the
C:/PythonProjects/vscode/...../helloworld_start.py
Is the absolute path of the file that you are running.
Simple it is running
python helloworld_start.py
If you want to reduce this. You can simply open a terminal and change the directory to the current working directory and simply run the above command. This will use the relative path to run the helloworld_start.py file
First you need to add python to the Environment variables and then Open the terminal uin VSCode using Ctrl + ` and then cd to the current working directory and run python helloworld_test.py

Related

How to run Dart code in Visual Studio Code terminal?

Why can't I run dart main.dart on the cmd but not on the terminal of Visual Studio Code? I can't even change the directory.
Output of terminal here:
In the first command you typed cd \bin which is trying to find a bin folder from your root. You should've just used cd bin (though probably instead running dart bin/main.dart from the root is better).
In the second command, there is a space in the path so you need to put quotes around the whole path.
That said, you may find it better to run your app using the Run menu in VS Code (eg. pressing F5), as you'll get full debugger support that way.

What settings do I have to change to make Visual Studio Code automatically run files in the right directory?

Coming from IDLE, I am used to be able to just left-click python files anywhere, it'll launch IDLE, and then pressing F5 just runs the script. In VSCode however, I have to open the terminal, cd into the right directory, and only then can I finally run my python script. Is there a way to change this behavior?
I was recommended to use the Code Runner extention and bound the Run Code (code-runner.run) command to my F5 key.
Then I noticed input() not being ran so I had to make sure code-runner.runInTerminal was on, but that re-started my problem from the beginning because the terminal was at the wrong working directory and then I finally found the code-runner.fileDirectoryAsCwd setting to run it from there.
I think this solution is similar to this one for the python extention, but I'm not sure if that would cause the whole wrong working directory issue again.
choose from menu file then click on auto save

Can somebody help me make Visual Studio Code with Julia ?

I am studying economics so I have not much experience in programming. I really would like to make Julia work on Visual Studio Code but I've been unsuccessful.
So I downloaded the Julia extension but I don't know how to define the settings. Do I need to create a launch.json file or any other file to make it work?
I think that somebody asked a similar question previously at "How to setup Julia in VS code?"
but the answer didn't really help me.
Thank you all for your help.
First you need to install Julia on your Mac by downloading the julia dmg file from here. This puts an application in the Applications folder.
There are several ways to set things up so julia will run from command line. I used the following:
ln -fs "/Applications/Julia-0.6.app/Contents/Resources/julia/bin/julia" /usr/local/bin/julia
This should work if the name of your application, that you just installed, is julia-0.6.app
After running the above command, you should be able to type Julia on the command line and have it to start.
You can now create a Julia script and place it in the directory you're running from. I created a file named julia_test001.jl It contained the following:
for i in 1:5
print(i, ", ")
end
This is a very short Julia script I wrote for testing.
Now start VScode and install the Julia language support extension. After that has loaded, open the file Julia_test001.jl. Once this file is opened, click the triangle in the upper right corner or open the command palette and select the option: run code. The julia_test001.jl should run and print the result 1,2,3,4,5.

Editing WSL config files\code etc with Visual Studio Code, in Windows

I am really enjoying WSL and using it for a lot of stuff these days, including my Ansible workstation, also writing a lot more code in it...
Question: I can see where the WSL file system is:
https://askubuntu.com/questions/759880/where-is-the-ubuntu-file-system-root-directory-in-windows-nt-subsystem-and-vice
All of the docs tell you very clearly to stay away from the Linux file system and not to access it from the Windows instance it is running under. Fine. But! I hate to ask redundant question, but I would dearly, dearly love to be able to use full blown graphical VS Code in Windows in my text editor for WSL. Am i missing a trick somewhere for a way to do this without breaking anything?
Apologies for the non question. Hopefully it is allowed.
In vscode...
You can press the green icon bottom-left
This will open the command palette
Choose "New WSL Window"
Open a folder, you will be able to navigate from ~ to choose location in command palette
Once folder is choosen, you're set to go, vscode will display file tree from opened folder and you can do your thing :)

How to open Visual Studio Code from the command line on linux?

I know I can use command "code" to open VS code or file, but I don't know what should I do to make it possible after I install VS code in Ubuntu.Thanks.
Launching from the Command Line
You can launch VS Code from the command line to quickly open a file, folder, or project. Typically, you open VS Code within the context of a folder. We find the best way to do this is to simply type:
code .
Tip: We have instructions for Mac users in our Setup topic that enable you to start VS Code from within a terminal. We add the VS Code executable to the PATH environment variable on Windows and Linux automatically during installation.
Sometimes you will want to open or create a file. If the specified files does not exist, VS Code will create them for you:
code index.html style.css readme.md
Tip: You can have as many file names as you want separated by spaces.
Source: https://code.visualstudio.com/Docs/editor/codebasics
So, there are a couple of solutions for this.
I've linked a video that shows you how to add vscode to $PATH
(which didn't work for me because I couldn't find the "shell:install path" command)
I uninstalled the vscode from my ubuntu and re-installed using sudo snap install --classic code
(This method worked for me)
Tell me which one works for you... and if you have extensions installed to your vscode then i guess you ought to make a backup or something.
Link to the video: https://youtu.be/iP5FKZXtDBs