How to debug with Rubymine, Docker-Compose and multiple debug sessions?

2.3k views Asked by At

I am experimenting with Rubymine's "Docker-Compose" integration. I normally do the "usual" debugging, by using the and "BUG"-buttons to start a debug session.

Normally I can start these sessions for the "rails server"- itself and one for debugging within the "rails console"- and the "rspec"-commands simultaneously. That's no problem when working "the old way" and works perfectly.

Old way means: running a

  • rails console AND rails server in debug session
  • MySQL
  • Elasticsearch
  • Redis
  • ...

on my local machine.

But with the docker-compose-configuration I have to do that differently:

I followed that tutorial (https://www.jetbrains.com/help/ruby/using-docker-compose-as-a-remote-interpreter.html#configure_ruby_docker_integration) to set up a singular debug session, but I was not able to find out how to use more than one debug session at once. (adding rails console in debug session while rails server's debug session is still running). Somehow they are conflicting. It's no problem to start a regular rails console in Rubymine while a rails serverdebug session is running

All tutorials and videos I found were only covering the most basic cases, but not mine.

  • Is this possible?
  • Do I have to change the debug port / open another one for the second session? (I didn't found how to change the Rubymine attached debugger port, it's fixed to "3000:3000"), it is "hardcoded in the appended docker-compose.override.1234.yml-file.

My containers are running

Rails Development Server Configuration Rails Development Server Configuration

Rails Console Configuration Rails Console Configuration

0

There are 0 answers