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

如何回滚VS Code至旧版本?排查Flask调试适配器异常

Troubleshooting "Debug adapter has terminated unexpectedly" After VS Code 1.21.1 Update & Rollback Guide

Hey there, let's break down how to figure out if the VS Code update is causing your Flask/Python debugging issue, plus how to roll back to an older version if needed.

Is the VS Code Update the Culprit?

To confirm if the 1.21.1 update is behind the error, try these quick checks:

  • First, verify if your Python extension was also updated around the same time. Sometimes extension updates (not just VS Code itself) can mess with debugging setups. You can check extension version history by going to the Extensions panel, finding the Python extension, clicking the gear icon, and selecting "Show Extension History".
  • Test your Flask project's debug configuration on a machine that's still running an older VS Code version (pre-1.21.1). If debugging works fine there, that's a strong sign the 1.21.1 update is causing the problem.
  • Give the VS Code Insiders Build a spin. If debugging works without issues in the Insiders version, it likely means there's a regression in the stable 1.21.1 release that's being worked on.

How to Roll Back to an Older VS Code Version

The process varies a bit by operating system, but here's how to do it on each:

Windows

  1. Open VS Code and press Ctrl+Shift+P to open the Command Palette.
  2. Type Install Specific Version of Code and select the option that pops up.
  3. You'll see a list of past VS Code versions—pick the one you want to roll back to (e.g., 1.21.0) and wait for the installation to finish.

macOS

  1. Open the Command Palette with Cmd+Shift+P.
  2. Search for Install Specific Version of Code and select it.
  3. Choose your desired older version from the list. Alternatively, if you installed VS Code via Homebrew, you can run this command in Terminal:
    brew install --cask visual-studio-code@1.21.0
    
    (Replace 1.21.0 with the exact version you need.)

Linux

  1. For Debian/Ubuntu-based systems:
    • First, uninstall the current version with sudo apt remove code.
    • Download the .deb package for your target older version from the VS Code version archive, then install it with sudo dpkg -i path/to/your/code-version.deb.
  2. For Fedora/RHEL-based systems:
    • Uninstall current version with sudo dnf remove code.
    • Download the .rpm package for the older version from the archive, then install with sudo rpm -i path/to/your/code-version.rpm.

Extra Tips

  • After rolling back, you might want to disable automatic updates temporarily to avoid being pushed back to 1.21.1 before the bug is fixed. Go to File → Preferences → Settings, search for "Update: Mode", and set it to "manual".
  • You can also check the VS Code GitHub Issues page to see if other users are reporting the same debug adapter crash with 1.21.1—this can confirm it's a widespread version-specific issue.

内容的提问来源于stack exchange,提问作者Craig Benson

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.21 07:16:14