Rails Byebug Did Not Stop Application

后端 未结 3 964
我在风中等你
我在风中等你 2021-01-30 17:37

I want to use byebug to debug my application but the app is never stop although I already put byebug inside my code. Here is my Gemfile.

group :deve         


        
相关标签:
3条回答
  • 2021-01-30 18:16

    To enable debugger mode:

    docker-compose run --service-ports web
    

    See this blog post

    0 讨论(0)
  • 2021-01-30 18:18

    I was having issues with changes to files (like adding byebug) being synced and found adding consistent to the volume definition helped:

      volumes:
        - .:/usr/src/app:consistent
    
    0 讨论(0)
  • 2021-01-30 18:38

    When using docker-compose in combination with byebug this needs to be added to make it work properly. Found in this blog post

    Add this to docker-compose.yml

    web:
      ...
      stdin_open: true
      tty: true
    

    Then run docker-compose in deamonized mode and attach to the web container with docker:

    docker-compose up -d
    docker attach myappname_web_1
    
    0 讨论(0)
提交回复
热议问题