add this to docker-composefile after build line
stdin_open: true
tty: true
to be like this
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
RUBY_VERSION: '2.7.2'
NODE_MAJOR: '15'
BUNDLE_VERSION: '2.2.1'
stdin_open: true
tty: true
then add debugger
to your code.
then to access to debugger attach your container by docker compose container_id
voila!