Remote Debugging RSpec => Stack Frame is Not Available

I am trying to set up a RubyMine configuration so that I can work with the project locally on my mac but run/debug the RSpec tests remotely on a linux machine.  I think I have the config set up correctly because I can run the tests outright just fine.  However, when I attempt to debug the same tests, RubyMine behaves strangely. 

The RSpec code operates as expected and I can hit the breakpoint in the RSpec code.  However, no breakpoints in the code that the test is driving are ever hit and I cannot step into any other code from the RSpec code.  Additionally, the Debugger frames window shows "Stack frame is not available" for everything that it has loaded except the RSpec code.  I do not see any errors or helpful troubleshooting or diagnostic info though.  It just doesn't work right.

What might I have misconfigured that could cause this behavior?  Is there a way to find more diagnostic or helpful info that can troubleshoot this behavior? 


Comment actions Permalink

Hi Olga!

Yes, SSH.  I set up an SFTP Deployment to point to my remote host and then added the remote Ruby SDK and Gems with it.


Yes if I choose an RSpec test and use Run, it executes perfectly fine and I get the expected test output in the RubyMine console as normal.  The problem is if I chose to Debug that RSpec (or the main application itself).  Debug begins to work and I can even stop at a breakpoint in the RSpec itself however only the main RSpec works.  Any breakpoints in code that the RSpec calls into are not hit and if I try to step into it from the RSpec it just doesn't work.  The call stack displays the frame from the RSpec but only displays "Stack Frame is Not Available" in the window where the stack frame should appear. I think it actually does step into it but there's no info shown indicating where it is or any variables or anything normal. 


I have verified that the deployment actually does push the files to the remote location but I'm not sure what else to check.  I believe the mappings are set up correctly also but I'm not certain since it almost works.  I'm confused since run works perfectly but debug cannot step through any code. 


Here's my info from the RubyMine about page:

RubyMine 2019.3.1
Build #RM-193.5662.59, built on December 18, 2019
Licensed to Mark Harris
Subscription is active until September 16, 2020
Runtime version: 11.0.5+10-b520.17 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.6
GC: ParNew, ConcurrentMarkSweep
Memory: 2014M
Cores: 4
Registry: ide.remote.interpreters.use.rsync=false
Non-Bundled Plugins: AngularJS, NodeJS,


I am using JRuby.

RubyGems Environment:
- RUBY VERSION: 2.3.3 (2017-11-08 patchlevel 0) [java]


And RSpec:

rspec-core (3.8.2)
rspec-expectations (3.8.6)
rspec-mocks (3.8.2)
rspec-rails (3.8.3)
rspec-support (3.8.3)


Thanks for your help!


Comment actions Permalink


could you please specify your RubyMine, ruby and rspec versions? In addition, how have you added Ruby SDK, via SSH? Do you manage to run the tests in RubyMine?

Comment actions Permalink

Hi Olga,

Any advice or thoughts about how I can troubleshoot this issue?

Thank you.


Comment actions Permalink

Any updates since then?
There is nothing where I can specify the ruby SDK version....

Comment actions Permalink

upd: found the reason:

The local path to the library I want to debug must be the same as its location on the remote host.

In my case it was:

remote: /usr/lib/ruby/gems/2.7.0/gems/liquid-4.0.3/lib/

local: /home/user/.rvm/gems/ruby-2.7.0/gems/liquid-4.0.3/lib

Nice that I have only one library to debug!


Please sign in to leave a comment.