Search code examples
visual-studio-code

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.


Solution

    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.