Skip to content Skip to sidebar Skip to footer

How to Edit Read Only Visual Studios

I am using Visual Studio Code V 1.31.1. I used an input function but I can't write an input in output panel it shows this mistake

Cannot edit in read-only editor.

Please assist me solve this problem.

asked Feb 24, 2019 at 20:47

5

  1. Go to File > Preference > Settings and then
  2. type: run code and curlicue down until yous see code-runner: Run in last , There will be multiple options called "code-runner". In that you can find the choice mentioned below.
  3. just check "Whether to run code in integrated last" and
  4. restart vscode.

For Mac users, information technology is Code > Preference > Settings.

answered Feb 26, 2019 at six:xix

v

If you can't find where to observe code runner equally said in Ali NoumSali Traore'southward answer, here'due south what you got to do:

  1. Go to extensions (Ctrl + Shift + X)
  2. Observe code runner and click on the settings icon on bottom right of the code runner
  3. Click configure extensions settings
  4. Find code_runner: Run in terminal
  5. Check "Whether to run lawmaking in concluding"

answered Jul thirty, 2019 at 14:11

1

You are in the "Output" tab instead of the Terminal. The output tab is actually but for you to read from.

enter image description here

Press F5 to brainstorm Debugging and it'll bring you into the Concluding tab.

The last is interactive, so you lot can read output AND type dorsum. It is indeed a console prompt/ terminal (hence its name).

enter image description here

answered Sep xxx, 2019 at 9:55

I received this error during a code compare with previous version and it wasn't letting me edit the current version in the Correct-Window. Unrelated to what I suspect OP's issue just this was the start thread that came up for my search and the error was the same. anyway...

My issue was that the particular file was 'Staged' in my source control at the time. This appears to restrict editing by opening an 'index' version for the compare.

Solution: Un-stage the file, and reopen the comparative window.

answered Jun v, 2019 at 15:01

ii

The easiest way to ready this was to printing (CTRL) and (,) in VS Lawmaking to open Settings.

After that, on the search bar search for code runner, then roll down and search for Run In Concluding and check that box as highlighted in the below image:

Dharman

26.2k xx gold badges 67 silver badges 117 bronze badges

answered Sep 25, 2020 at ten:59

Had the same problem. Here's what I did & it got me the results I wanted.

  1. Go to the Concluding of Visual studio code.
  2. Cd to the directory of the file that has the code you lot wrote and ran. Let'due south call the program " xx.cpp "
  3. Type g++ xx.cpp -o a.out (creates an executable)
  4. To run your plan, blazon ./a.out

answered Jul 26, 2019 at 13:53

I received the same error like @jgritten. Merely like the comment before me past @jgritten, I 'unstaged' and reopened vscode and the files. At present I 'staged' it again. The error "Cannot edit in read-only editor" didnt come up.

Hope this reassures anyone who might have similar error afterward staging the file using git in vscode.

answered Jul xv, 2019 at xi:06

I was experiencing this issue while using the SFTP extension in VSCode. In this case, all y'all have to do is right-click somewhere in the file and select 'edit in local'

enter image description here

enter image description here

enter image description here

answered Nov 12, 2020 at 13:48

If your lawmaking takes input from a user you can't simply use output tab. You have to use any terminal as Hashemite kingdom of jordan Stefanelli accept said.

  1. just become to last tab and select powershell or default final
  2. type python Nameoffile.py
  3. you will be able to input

colidyre

3,320 11 gilt badges 32 silver badges 46 bronze badges

answered Apr xx, 2020 at 1:02

I had the Cannot edit in read-only editor error when trying to edit code after stopping the debug mode (for ii-3 minutes subsequently pressing Shift+F5).

Turns out the default Node version (v9.11.ane) wasn't exiting gracefully, leaving VScode stuck on read-simply.
Simply adding "runtimeVersion": "12.4.0" to my launch.json file fixed it.

alternatively, change your default Node version to the latest stable version (you can meet the current version on the DEBUG CONSOLE when starting debug fashion).

answered Nov 18, 2020 at 10:31

Equally the @Jordan Stefanelli answer: If you encounter the same problem as me that the integrated Last cannot read input from user as below hanging (env. Windows 10)

enter image description here

my solution was to replace cygwin'due south gdb and m ++ with mingw64's.

then the input output are normal

enter image description here also you lot tin can enable "external console" option to solve it:)

you tin change it by enabling "externalConsole":true in the launch.json then you will become a pop upward console window that you lot can blazon in.

answered November 27, 2019 at 8:01

Short Reply: Later installing "Code Runner" extension, you lot merely accept to right-click the selected office of code you wish to execute and see it in the Output Tab.

answered November 23, 2020 at fourteen:nineteen

Click on the file and hover on Preferences. there yous will notice the get-go option as Settings and click on that. There search run code. and scroll and find the option code runner: Run in Terminal. now cheque the option beneath information technology

answered Dec 19, 2020 at 6:13

I had the aforementioned problem, even though i enable the code runner to true, i was non all the same able to go my vsc terminal run. The quick fix was that mentioned by @Jordan Stefanelli. I add together to my setting.json in the launch department "externalConsole":true,

                "launch": {           "externalConsole":true,     "configurations": [],     "compounds": [] }                              

answered Mar 31, 2021 at 11:49

Hither'south the easy mode: In a higher place your fault "cannot edit in read-only editor" there will be a path to your cpp code file, it might await something like this if you are running on Linux:

                cd "/home/jacksparrow/Documents/projects/" && g++ exams.cpp -o exams && "/home/jacksparrow/Documents/projects/"exams                              

so all y'all have to do is "copy(ctrl+shift+C) that path accost and paste(ctrl+shift+V) it in the terminal window and press enter" right adjacent to your output and debug console window. This worked for me, hope it does for you too.

answered May 7, 2021 at 17:23

In VS Lawmaking, install code runner. When running your file please specify how you want to run the file, in the output window or terminal. For a better experience make sure you take selected the terminal.

answered May 12, 2021 at 12:10

answered Feb 7 at iii:29

Not the answer you lot're looking for? Browse other questions tagged visual-studio-code or ask your own question.

vanoverpophe1936.blogspot.com

Source: https://stackoverflow.com/questions/54856374/cannot-edit-in-read-only-editor-vs-code

Post a Comment for "How to Edit Read Only Visual Studios"