Cannot use externalTerminal

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I’m trying to run dotnet console program, which has Console.ReadKey function call. It fails because Debug Console is redirected and it does not support reading keyboard. I tried to set externalTerminal in the Cursor settings and launch settings, but it seems it is completely ignored.

Steps to Reproduce

Create dotnet a console program with Console.ReadKey line

Operating System

Windows 10/11

Version Information

Version: 2.4.31 (system setup)
VSCode Version: 1.105.1
Commit: 3578107fdf149b00059ddad37048220e41681000
Date: 2026-02-08T07:42:24.999Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.26200

Additional Information

Exception has occurred: CLR/System.InvalidOperationException
An unhandled exception of type ‘System.InvalidOperationException’ occurred in System.Console.dll: ‘Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read.’
at System.ConsolePal.ReadKey(Boolean intercept)

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. It looks like this is a limitation of the Anysphere C# extension. Some launch configuration options that work in VS Code aren’t fully supported yet. There was a similar report recently where pipeTransport was also being ignored.

A couple things to try:

  1. In your launch.json, set "console": "integratedTerminal" instead of "externalTerminal". The integrated terminal should support Console.ReadKey since it isn’t redirected like the Debug Console.
  2. If that still doesn’t work, could you share your launch.json config? That’ll help us see what exactly is being ignored.

I’ve reported this to the team. No ETA yet, but your report helps us prioritize it.

It might support, but integratedTerminal is not effective value either. Opus 4.6 already tried all possible things it could think to make it work.

The important part of config is something like this now:

        {
            "name": "Run All",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${workspaceFolder}/bin/Debug/net10.0-windows/VMWARE_TESTING.dll",
            "args": ["all"],
            "cwd": "${workspaceFolder}",
            "console": "integratedTerminal",
            "stopAtEntry": false

        }

But console variable has had “externalTerminal” and also default “internalConsole”. They all just keep using the Debug Console.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.