Error Debugging in Visual Studio Code: 'ConnectionLostException' when attempting to run C# code

Ladislav Hochman 40 Reputation points
2023-10-05T08:57:22.1533333+00:00

Visual Studio Code Version: 1.79
Operating System: Windows 11 Pro, 64-bit

Problem Description:
When attempting to debug C# code in Visual Studio Code, the following error message appears: "Your changes cannot be applied due to an unexpected error: ConnectionLostException. The 'next' operation was cancelled." This occurs both when pressing the F10 key and when clicking on 'Continue'. Until recently, everything was functioning without any problems. However, this issue suddenly emerged while coding and has persisted across different projects.

Developer technologies | Visual Studio | Debugging
Developer technologies | C#
{count} votes

4 answers

Sort by: Most helpful
  1. Pete 10 Reputation points
    2023-10-13T15:40:33.42+00:00

    Same issue, also resolved by removing c# dev kit...

    2 people found this answer helpful.

  2. Ardhio Wibowo 0 Reputation points
    2024-01-12T06:36:32.81+00:00

    you don't have to remove it, try to install previous version. Debugging with C# Dev Kit 'v0.2.100' works in mine

    0 comments No comments

  3. Egbertn 6 Reputation points
    2024-03-07T10:35:26.3266667+00:00

    When will MSFT finally not release crappy releases? My productivity goes down due to bad quality of this c# dev kit.

    It even caused me to not have a certain job due to VS being updated just before the interview, and all intellisense was gone.


  4. Velouria Denzer 0 Reputation points
    2025-08-22T06:09:12.1633333+00:00

    so cool good job

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.