Share via

visual studio code window is getting terminated unexpectedly frequently

Ramchandra Vibhute, Revati 0 Reputation points
2026-04-01T06:42:41.5566667+00:00

seeing User's image

below window after every few mins

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.


1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-04-01T06:43:10.8233333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The message indicates that the Visual Studio Code window is repeatedly crashing due to an out‑of‑memory (OOM) condition. A similar situation is documented for Visual Studio debugging services running out of memory, and the same investigation pattern applies: identify which process is exhausting memory and then reduce its usage.

    Use the following steps on Windows:

    1. Monitor memory usage while VS Code is running
      • Open Task Manager and watch memory for:
        • Code.exe (VS Code itself)
        • Any related debug or helper processes if you are debugging.
      • If memory for Code.exe grows continuously until the crash, VS Code or an extension is leaking memory.
    2. Check whether the debug target or tools are consuming memory
      • If the crash happens only while debugging or running a specific app, open the Diagnostics Tools window in Visual Studio (if you also use it for the same solution) and use the Memory Usage tool to see if the target app is growing in memory. The same pattern (target app growing until OOM) can indirectly cause issues in the tooling.
    3. If VS/VS Code itself is consuming memory
      • In Task Manager, if devenv.exe (Visual Studio) or Code.exe (VS Code) is the process whose memory climbs very high before the crash, treat it as a tooling memory issue:
        • Reduce or temporarily disable extensions, especially those that perform heavy analysis, to see if the problem stops.
        • Close unused tool windows and large solutions/workspaces to reduce memory pressure.
    4. If Visual Studio is also affected
      • For Visual Studio, specifically follow the documented guidance when debugging services run out of memory:
        • Use the Diagnostics Tools window’s process memory graph to confirm whether the target app or Visual Studio is growing in memory.
        • If devenv.exe is the one growing, reduce the number of Visual Studio extensions.
    5. If the issue persists
      • If crashes continue after reducing extensions and confirming that the target app is not leaking memory, collect details (which process is high in memory, what you were doing when it crashed) and report it using the Report a Problem tool in Visual Studio / VS Installer so the product team can investigate.

    References:

Your answer

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