求助:VSCode调试Python提示‘python调试类型不支持’,如何重置默认设置?
Fixing "Configured debug type 'python' is not supported" in VS Code
Hey there! I know it’s frustrating when you’re just starting out with VS Code and Python, and a settings tweak throws a wrench in things. Let’s walk through resetting your settings back to default and getting your debug setup working again.
Step 1: Reset Python-Related Settings (or All User Settings)
You’ve got two options here—either reset just the Python-specific changes you made, or wipe all custom user settings to start fresh:
Option A: Reset Only Python Settings
- Open the Settings panel using
Ctrl+,(Windows/Linux) orCmd+,(Mac), or click the gear icon in the bottom-left corner and select Settings. - Switch to the User tab (this ensures you’re modifying settings that apply across all projects, not just your current workspace).
- In the search bar at the top, type
pythonto filter all Python-related settings. - Look for any settings that have a blue underline (these are the ones you’ve modified from default). For each, click the circular reset arrow icon on the right to revert it.
Option B: Fully Reset All User Settings
If you want a complete clean slate for your VS Code user settings:
- Open the Command Palette with
Ctrl+Shift+P(Windows/Linux) orCmd+Shift+P(Mac). - Type
Preferences: Open User Settings (JSON)and select it. - Delete all content inside the JSON file, save it, then close and restart VS Code. This will revert every user-level setting to its default state.
Step 2: Quick Post-Reset Checks
After resetting, take these quick steps to make sure everything’s set up correctly:
- Update the Python Extension: Open the Extensions panel (
Ctrl+Shift+X/Cmd+Shift+X), find the official Python extension by Microsoft, and click "Update" if an update is available. Restart VS Code after updating. - Select Your Python Interpreter: Open the Command Palette again, type
Python: Select Interpreter, and choose the Python version you have installed on your system (e.g.,Python 3.11.4 64-bit).
Step 3: Test the Debugger
Open your Python file, then:
- Click the run button in the top-right corner, or
- Open the Debug panel (click the bug icon in the left sidebar), select
Python: Current Filefrom the dropdown, and hit the green play button.
This should get your debugger working again without that annoying error message.
内容的提问来源于stack exchange,提问作者Eric Knorr
相关产品推荐
相关产品推荐

