How to remote debug a rails application

I have a rails which I start at localhost port 9000 (0.0.0.0:9000). I want to debug the entire rails app (as in not a particular file but the entire project). Following are the steps I followed -

Set up a edit configuration with following parameters - 

  • Server command - rdebug-ide --host 0.0.0.0 --port 8000 --dispatcher-port 26162 --$COMMAND$
  • remote host - 0.0.0.0
  • remote port - 8000
  • remote root folder - /home/user/project
  • local port- 26162
  • local root folder - /home/user/project

Run the rails server as - rdebug-ide --host 0.0.0.0 --port 8000 --dispatcher-port 26162 -- rails s -p 8000

I a unable to attach to the debugger and I am getting the error  - 

Local root is not specified or incorrect.

How do I resolve this?

 

 

1 comment
Comment actions Permalink

Hi Somya.

You should edit Rails configuration, not Ruby remote debug in Run/Debug Configurations dialog.

e.g.

  • Server: default
  • IP Address: 0.0.0.0
  • Port: 3000
  • Server arguments: (blank)
  • Environment: production

And run debug it from run -> Debug... menu.

0

Please sign in to leave a comment.