docker WebStorm IDE无法连接到节点--检查应用程序

olmpazwi  于 2023-03-22  发布在  Docker
关注(0)|答案(1)|浏览(74)

我有以下的docker-compose文件:

version: '3.9'

services:
  database:
    image: mongo:3.6
    restart: on-failure
    ports:
      - 27017:27017
    environment:
      MONGO_INITDB_ROOT_USERNAME: admin
      MONGO_INITDB_ROOT_PASSWORD: admin

  server:
    restart: on-failure
    image: parseplatform/parse-server:5.2.3
    ports:
      - 1337:1337
      - 9229:9229
    environment:
      - PARSE_SERVER_APPLICATION_ID=$SERVER_APPLICATION_ID
      - PARSE_SERVER_APPLICATION_NAME=$SERVER_APPLICATION_NAME
      - PARSE_SERVER_MASTER_KEY=$SERVER_MASTER_KEY
      - PARSE_SERVER_DATABASE_URI=mongodb://admin:admin@mongo/parse_server?authSource=admin
      - PARSE_SERVER_MOUNT_GRAPHQL=true
      - PARSE_SERVER_CLOUD=/parse-server/cloud/main.js
      - PARSE_SERVER_GRAPH_QLSCHEMA=/parse-server/cloud/schema_2.graphql
    links:
      - database:mongo
    depends_on:
      - database
    entrypoint: "node --inspect /parse-server/bin/parse-server"
    volumes:
      - ./parse-server/cloud:/parse-server/cloud
      - ./parse-server/config:/parse-server/config
      - ./parse-server/scripts:/parse-server/scripts

在运行docker-compose up之后,我添加了一个Attach to Node.js/Chrome配置,如下所示:

然后,我按下debug按钮,希望远程连接,但之后我收到此错误消息:

如果我把这个链接:
调试器正在侦听ws:127.0.0.1:9229/8d1f289a-3fee-48bc-a549-57e9427e40f12023-03- 17 T21:06:30.486524291Z有关帮助,请参阅:https://nodejs.org/en/docs/inspector
在浏览器中使用它,我得到这个错误:

t3psigkw

t3psigkw1#

为了解决这个问题,我不得不将IDE更新到2022.3.4。

相关问题