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

VS Code中Azure Functions(PowerShell)调试功能失效求助

VS Code中PowerShell Azure Functions调试停滞的解决办法
  • 清理本地缓存与重载窗口

    1. 删除项目根目录下的.azurefunctions缓存文件夹
    2. 按Ctrl+Shift+P(Windows/Linux)或Cmd+Shift+P(Mac)执行Developer: Reload Window重载VS Code
  • 核对PowerShell与扩展版本

    1. 终端运行$PSVersionTable.PSVersion确认使用PowerShell 7.x版本(避免Windows PowerShell 5.1)
    2. 在VS Code扩展市场更新Azure Functions和PowerShell扩展到最新稳定版
  • 重置调试配置

    1. 删除.vscode/launch.json文件,按F5重新生成调试配置
    2. 检查生成的launch.json中program路径是否指向正确的PowerShell 7可执行文件(例:C:\Program Files\PowerShell\7\pwsh.exe)
  • 修复Func CLI工具

    1. 终端运行func --version查看版本,过时则执行卸载:npm uninstall -g azure-functions-core-tools
    2. 安装最新稳定版:npm install -g azure-functions-core-tools@4 --unsafe-perm true
    3. 用func start --verbose手动启动函数,查看终端是否有端口占用、依赖缺失等错误
  • 排查扩展冲突
    暂时禁用非必要扩展(除Azure Functions、PowerShell外),逐个重新启用,定位是否有扩展冲突导致调试异常

内容的提问来源于stack exchange,提问作者Randy Knight

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.12 14:05:01