Can not setup visual studio code debugger - visual-studio-code

I have downloaded VS code, but the debugger doesnt work.
It says no configurations. I put a short video to show you what happens.
Thanks a lot.
short video

I don't think it has anything to do with VS Code. The error is "Cannot find runtime 'node' on PATH", so that leads me to believe you either need to download Node.js and/or add 'node' to your PATH. Run the following line from Command Prompt:
SET PATH=%PATH%;C:\Program Files\Nodejs;
It also wouldn't hurt to reboot afterward.

Related

After updating Dart its showing "Configuration ' (Flutter)' is missing in 'launch.json'."

I opened vs code and it said "Your Dart Code is Updated" to version 3.something; but after that I can't run my app it gives me error
Configuration 'NameOfApp (Flutter)' is missing in 'launch.json'.
What should i do
Goto Run in vscode then click on Add Configuration option. Thats all now you can run your app without any problem.
Check the indenting of the code inside lunch.json.
Sometimes if you copy/paste the launch.json file from another project or source you might have an extra column that breaks vs code debug process. At least that was my case!
Open VS Code>Run>Add Configuration.
now run your app! It must works fine.

Input does not work in Visual Studio Code

So I just started learning programming and I think something is messed up with my code runner in Visual Studio Code. When I try to use input in Python I can not write anything in the terminal. This problem came out recently. It writes that when I try to input anything that it "cannot edit in read-only editor". I also checked in here what could be the solution, but it did not help. Input still does not work. I am on Linux, and I also tried to uninstall the program and code runner as well, none of them worked so far.
Ps: I tried the Code-runner: Run in Terminal box check method, which did not work at all.

Why does Visual Studio Code refuse to run and display this error message?

I installed Visual Studio Code for the first time and upon trying to run it, it halts with an alert that says:
Please make sure the following directories are writeable:
/Users/~/Library/Application Support/Code
/Users/~/.vscode/extensions
The first path should be writable, but the second one doesn't seem to exist. I searched hidden files and it's still not where it should be.
System: OSX High Sierra, 10.13.6
Any ideas why I'm getting this error?

Debugging Python Code, Visual Studio Code, Virtual Enviroments

I have been trying to configure the debugger on vscode for debugging python code. Below is the launch.json config and following are the settings.json and externalTerminal (launch.json) config, respectively.
I have read through the documentation but I am afraid I am not able to understand it. From what I read on there, I need to set up my external terminal configuration as the integrated terminal isn't capable of accepting inputs(yet).
I am using virtualenvs for my project and I have them in the path: usr/Projects/VirtualEnvs. All my venvs reside in there. I tried to set "python.pythonPath": "/usr/Projects/VirtualEnvs/myVenv/bin/python3.6" which doesn't seem to work. Could anyone help me out or at least point me in the right direction (would be a good learning experience)? Please let me know if my question isn't clear enough.
I figured it out!
My mistake: The python interpreter was not set for the script I was debugging, and since I was using a venv with different Python version, I was thinking that maybe I'd have to somehow set it to that version of the Python interpreter!
How I came to the solution?: Today, while studying and getting stuck with a problem, I noticed that near my shebang was line that said 'Set as interpreter'. I clicked that and VSCode told me that it was now using Python 3.6.1 as the interpreter, that kind of got me excited. Just to be sure I did a google search and found this video. That, very quickly, helped me understand my problem that firstly the interpreter wasn't set and secondly, I was running the debugger from the wrong file!
"program": "${file}",
"cwd": "${workspaceFolder}"
This setting takes care of which folder and what file for you!
For the External Terminal configuration, a new terminal window pops up and you can supply args to your input statement and watch as the debugger goes step by step!

I can't save a file in Visual Studio Code which is checked out from TFS

I want to edit a file that's checked in to TFS using Visual Studio Code, but even though I've checked it out (from within Visual Studio) I get an error when I try to save it:
"Failed to save 'myfile.cfc': A system error occured (EPERM: operation not permitted, open 'd:...\myfile.cfc')".
I've tried different file types and ensured that the Read-only attribute is off on the file, but I still can't save anything. (I can do a Save-As and edit & save that file all I want, but of course I'm not going to do that).
Does anyone know what I can do?
Sorry for the late reply - running VS Code as administrator fixed the problem.
Too bad it gives you a misleading error message.
Are you running VSCode as an admin explicitly? If not, and if UAC is enabled, this could cause the behavior that you're seeing.