Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot edit in read-only editor VS Code

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 error

Cannot edit in read-only editor.

Please help me solve this problem.

like image 256
Asif Avatar asked Feb 24 '19 20:02

Asif


People also ask

How do you fix Cannot edit in read only editor in VS Code?

To fix that, instead of opening the file in diff view. Right-click on it and choose Open Changes > Open Previous Changes with Working File. This view will let you edit while comparing. Hope this helps.

How do I enable editing in VS Code?

You can edit via the Settings editor Workspace tab or open that tab directly with the Preferences: Open Workspace Settings command. All features of the Settings editor such as settings groups, search, and filtering behave the same for Workspace settings.

Can edit in read only editor VS Code settings json?

By default, VS Code shows the Settings editor, but you can still edit the underlying settings. json file by using the Open Settings (JSON) command from your command palette or by changing your default settings editor with the workbench.


1 Answers

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

For Mac users, it is Code > Preference > Settings.

like image 90
A. Traore Avatar answered Oct 14 '22 08:10

A. Traore