code-run | An online code editing preview tool similar to codepen | Editor library
kandi X-RAY | code-run Summary
kandi X-RAY | code-run Summary
An online code editing preview tool, similar to codepen, jsbin, jsfiddle, etc.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of code-run
code-run Key Features
code-run Examples and Code Snippets
Community Discussions
Trending Discussions on code-run
QUESTION
In a Node command I have passed two arguments--each a file name. When I print the command line arguments to the console using the console.log(process.argv)
, the last argument is missing the slash delimiters in the path. Any ideas why, or how to troubleshoot this? Here is the output.
ANSWER
Answered 2021-Jun-13 at 12:10I figured out the cause of my issue. It was due to this line in my settings.json
file:
"shell": "C:/Program Files/Git/bin/bash.exe",
Once I removed that, my issue went away.
QUESTION
New to coding. I'm learning online and I was following footsteps from a teacher on visual studio-code as they told me to edit the default settings in code-runner.executorMap. Whilst doing so, i've accidentally pressed or removed something. Down below on (problems), it keeps showing the following - Property expected json (513) [54,101] showing up on problems.
Need help if possible, thank you. visual studio-code property expected (513) image
...ANSWER
Answered 2021-May-18 at 12:44JSON files must follow a certain format, you can refer to https://www.tutorialspoint.com/json/json_syntax.htm
According to your screenshot, you have an extra comma ,
at the cursor position in the figure, and you missed a closing brace afterwards }
You can also refer to my default settings:
In addition, it is best not to modify the default settings of vscode, but to modify the user settings, the best reference is
QUESTION
My basic issue is that I get an error whenever I try to import a Python module in VSCode, which doesn't happen when using PyCharm.
From what I've read so far the problem seems to be with the python path, or the interpreter. My issue is, that I don't really understand what the issue is, meaning I quickly feel lost when trying to apply some of the other solutions I have found, because I don't know what to look for.
Can someone clarify what is going wrong and how to fix it?
Edit: I probably forgot to add a crucial detail. I was facing this issue when running my python files using the code runner. This is what I needed to add to my settings.json in order to get everything working completely: "code-runner.executorMap": { "python": "$enterPythonPathhere" }
...ANSWER
Answered 2021-Apr-20 at 16:55In VS Code press Ctrl+Shift+P
Type select interpreter in the search box
QUESTION
I'm trying to change some settings in VS code but keep getting an expected comma error. I got this error on one of the lines so I copied it and moved it to the bottom and it sopped giving me an error only to move it down to the next line.
I've tried looking this up but all the answers seem super niche and vs code tells me there is no way to solve it even though they are telling me there is an error
...ANSWER
Answered 2021-Mar-25 at 01:05You are missing a comma at the end of line 22 "workbench.colorTheme": "Cobalt2"
QUESTION
whenever I save a .py file, even if it's new, I get an error in my output window... I think is because of Pylance but I can use it without a problem.
I am new in Python and I don't really know how to fix that.
This is the message I get:
"""
User belongs to experiment group 'pythonaacf' User belongs to experiment group 'pythonSendEntireLineToREPL' User belongs to experiment group 'pythonNotDisplayLinterPrompt' User belongs to experiment group 'pythonTensorboardExperimentcf' User belongs to experiment group 'ShowExtensionSurveyPrompt - enabled' User belongs to experiment group 'CollectLSRequestTiming - control'
conda --version pyenv root python3.7 c:\Users\jvald.vscode\extensions\ms-python.python-2021.3.658691958\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)" python3.6 c:\Users\jvald.vscode\extensions\ms-python.python-2021.3.658691958\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)" python3 c:\Users\jvald.vscode\extensions\ms-python.python-2021.3.658691958\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)" python2 c:\Users\jvald.vscode\extensions\ms-python.python-2021.3.658691958\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)" python c:\Users\jvald.vscode\extensions\ms-python.python-2021.3.658691958\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)" py -3.7 c:\Users\jvald.vscode\extensions\ms-python.python-2021.3.658691958\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)" py -3.6 c:\Users\jvald.vscode\extensions\ms-python.python-2021.3.658691958\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)" py -3 c:\Users\jvald.vscode\extensions\ms-python.python-2021.3.658691958\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)" ~\AppData\Local\Programs\Python\Python39\python.exe c:\Users\jvald.vscode\extensions\ms-python.python-2021.3.658691958\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)" py -2 c:\Users\jvald.vscode\extensions\ms-python.python-2021.3.658691958\pythonFiles\pyvsc-run-isolated.py -c "import sys;print(sys.executable)" ~\anaconda3\Scripts\conda.exe info --json Error 2021-03-17 13:12:00: Detection of Python Interpreter for Command py and args -2 failed as file Python 2 not found!
-3.9-64 -3.8-64 -3.6-64 does not exist Error 2021-03-17 13:12:00: Detection of Python Interpreter for Command py and args -3.7 failed as file Python 3.7 not found!
-3.9-64 -3.8-64 -3.6-64 does not exist Python interpreter path: ~\AppData\Local\Programs\Python\Python39\python.exe Starting Jedi Python language engine.
~\anaconda3\Scripts\conda.exe info --json ~\AppData\Local\Programs\Python\Python39\python.exe c:\Users\jvald.vscode\extensions\ms-python.python-2021.3.658691958\pythonFiles\pyvsc-run-isolated.py pylint --disable=all --enable=F,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,unused-wildcard-import,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode,E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0107,E0108,E0110,E0111,E0112,E0113,E0114,E0115,E0116,E0117,E0118,E0202,E0203,E0211,E0213,E0236,E0237,E0238,E0239,E0240,E0241,E0301,E0302,E0303,E0401,E0402,E0601,E0602,E0603,E0604,E0611,E0632,E0633,E0701,E0702,E0703,E0704,E0710,E0711,E0712,E1003,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701 --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text "d:\012_PYTHON\Udemy\004.Postgree and SQL\02.Start Postgree\psycopg2-binary.py" cwd: d:\012_PYTHON\Udemy\004.Postgree and SQL ~\AppData\Local\Programs\Python\Python39\python.exe c:\Users\jvald.vscode\extensions\ms-python.python-2021.3.658691958\pythonFiles\pyvsc-run-isolated.py pylint --disable=all --enable=F,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,unused-wildcard-import,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode,E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0107,E0108,E0110,E0111,E0112,E0113,E0114,E0115,E0116,E0117,E0118,E0202,E0203,E0211,E0213,E0236,E0237,E0238,E0239,E0240,E0241,E0301,E0302,E0303,E0401,E0402,E0601,E0602,E0603,E0604,E0611,E0632,E0633,E0701,E0702,E0703,E0704,E0710,E0711,E0712,E1003,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701 --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text "d:\012_PYTHON\Udemy\004.Postgree and SQL\02.Start Postgree\psycopg2-binary.py" cwd: d:\012_PYTHON\Udemy\004.Postgree and SQL ~\anaconda3\Scripts\conda.exe env list ##########Linting Output - pylint##########
"""
This is my Settings Json:
...ANSWER
Answered 2021-Mar-19 at 01:27According to the information you provided, they show the process of VS Code loading related extensions, loading language services, and executing python scripts, and so on.
Please try to reinstall the "Python" extension and reopen VS Code.
QUESTION
I have just started using visual studio and I was switching from python 2 to 3 on mac from a youtube tutorial and I have run across this error quite a lot, "Unable to write into user settings. Please open the user settings to correct errors/warnings in it and try again." The error is on settings.json. I just started python on this so please forgive me if this is a simple question. I've got no idea what to do, I tried reinstalling it, opening a new file.
Here is where the error occurs, the javascript is underlined in red and it says "Colon expected jsonc(515) View Problem (⌥F8) No quick fixes available". there's a bunch of stuff before and after this but I've typed where the error occurs. [here's a screenshot][1] [here's a second one][2]
code:
'''
...ANSWER
Answered 2021-Mar-06 at 06:49You have entered in code-runner executor map twice.
replace
QUESTION
Whenever I am trying to apply any new theme or change the font I am always getting the error mentioned above. Then it opens settings.json whose code I am pasting below
...ANSWER
Answered 2021-Feb-02 at 09:03The json file you pasted needs an opening curly brace at the very beginning.
You're also missing quite a few commas.
QUESTION
As soon as I click 'Run Python File in Terminal', it does nothing, no errors, nothing just remains idle, but if I run the same file with the python IDLE, it works, I re-installed the latest version of Python and VS Code but still the problem isn't solved. Also, the Terminal shows a Powershell advert and doesn't show the path like it usually should.
Edit: Powershell shows an advert and doesn't work properly
The code runs properly in CMD
The VS Code extensions I use are:
- Bracket Pair Colorizer
- Code Runner
- Jupyter (Idk what it does but VS Code prompted me to install it for Python)
- Live Server
- Material Icon Theme
- Pylance (Idk what it does but VS Code prompted me to install it for Python)
- Python
This is the content of settings.json
...ANSWER
Answered 2021-Jan-28 at 08:04According to the information you provided, the problem is that the powershell terminal that comes with the system cannot be used. Because VS Code is an editor, its internal powershell terminal integrates the powershell terminal from the system. However, VS Code not only supports this terminal, it also supports cmd terminal, bash and so on.
Solution: Since you can run python code in cmd terminal outside of VS Code, please use
QUESTION
I have recently started learning C++ and am using Visual Studio Code for it. I have been starting to transfer a Python non-aggregate type 'vector >' cannot be initialized with an initializer list
while trying to declare a 2D matrix with std::vector
. When I looked online to see how others fixed this problem, it said that this kind of error often is raised when versions of C++ older than C++11 are used, and followed the instructions given to instruct Visual Studio Code to use the argument -std=c++11
when compiling the program. However, this did not change anything, and I now have no idea on how to fix the error.
Code:
...ANSWER
Answered 2021-Jan-04 at 12:07Have you tried changing the args
in your task.json
file? It should more or less, look like this.
QUESTION
I've already installed and set up all of the necessary technologies to make C++ run in VScode, including the C/C++ debugger extension, the C/C++ compiler extension, the coderunner extension, and minGW. I'm using Visual Studio Code version 1.51.1, C/C++ extension version 1.1.2, C/C++ compile and run extension version 1.0.13, and Code Runner version 0.11.1.
When I just run my code it runs in the terminal properly, and when I intentionally put bugs in the code the terminal reads out the proper error messages. The issue is when I try to run the debugger, I get redirected to settings.json and the debugger does nothing.
Just to be clear this question is about the VScode software itself, not the C++ program I wrote, which was just a simple hello world.
The json in settings.json looks like this:
...ANSWER
Answered 2020-Dec-03 at 04:20I have minGW and VS Code setup on my windows. You can try my setup and see if it solves your issue of debugging.
Inside your project folder make another folder .vscode and add these three files :
In launch.json
edit "miDebuggerPath": "\\gdb.exe"
In c_cpp_properties.json
edit "compilerPath": "//bin"
The project directory Should look something like this.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install code-run
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page