You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VSCode编译完成后出现冻结问题求助

Troubleshooting Stuck Console After Successful VS Code Source Compilation with yarn run watch

Hey there, I totally get how confusing this must be when you're compiling VS Code source code for the first time—you run yarn run watch, it finishes with Finished Compilation with 0 errors, but then the console just hangs, even switching terminals doesn't fix it. Let's break this down and figure out what's going on:

First, Check if This Is Actually "Stuck" or Just Expected Behavior

Let's start with the basics: the yarn run watch command is designed to stay running indefinitely after compilation. Its core job is to monitor your source files for changes, and automatically recompile whenever you edit any code. So if your console is just sitting at the Finished Compilation with 0 errors line without exiting, that might be totally normal!

Test this by making a tiny change to any source file (like adding a random comment somewhere) and check if the console springs back to life with a new compilation process. If it does, you're all set—this is exactly what the command is supposed to do.

If It's Actually Unresponsive (No Recompilation on File Changes)

If modifying files doesn't trigger any new activity in the console, then we have a real issue to fix. Try these steps:

  • Clear caches and restart:
    Stop the current watch process first, then run these commands to clear build caches:
    yarn cache clean
    rm -rf node_modules/.cache
    
    After that, re-run yarn run watch and see if the console behaves normally.
  • Check system resource usage:
    Compiling VS Code is resource-heavy—open your task manager (Windows) or activity monitor (Mac) to check if your CPU or memory is maxed out. If so, close other resource-hungry apps and try again.
  • Verify your Node.js version:
    VS Code has specific Node.js version requirements. Check the README in the VS Code source repo for the recommended version, then use a version manager like nvm to switch to that version before re-compiling.
  • Simplify your terminal setup:
    Sometimes terminal plugins, custom themes, or special settings can interfere with long-running processes. Try switching to a plain, default terminal (no plugins, no custom config) and run the command again.

Verify the Compiled Code Works

Regardless of the console state, you can confirm if the compilation was successful by launching VS Code in a separate terminal:

yarn run code

If the VS Code app opens up without issues, your compilation was a success—any "stuck" console is just the watch command doing its job of waiting for file changes.


内容的提问来源于stack exchange,提问作者Long Nguyen

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 03:53:47