在Docker容器中调试Azure函数

时间:2019-04-16 08:12:46

标签: python docker visual-studio-code azure-functions vscode-debugger

我想知道是否可以使用VS Code调试Azure Functions(在容器内运行)。

我尝试创建配置波纹管,启动容器并尝试运行调试器,但是它断开了连接,没有任何消息:

{
    "name": "Attach (Remote Debug)",
    "type": "python",
    "request": "attach",
    "port": 9091,
    "host": "localhost",
    "pathMappings": [
        {
            "localRoot": ".",
            "remoteRoot": "/usr/src"
        }
    ]
}

还有docker-compose.yaml

version: '3'
services:
  app:
    build: .
    tty: true
    stdin_open: true
    volumes:  
      - ./:/usr/src
    ports:
      - 9091:9091

我的图像包含azure-functions-核心工具以及运行功能所必需的一切。

0 个答案:

没有答案