Debugger not stopping at breakpoints on rspec tests

Answered

Hi, this is a weird issue I've been having in the last week or 2. Whenever I Debug a test in RubyMine, it just no longer stops at breakpoints. I've tried both breakpoints in the rspec test itself as well as breakpoints in my code base. When I start my Rails server, however, it still stops at the breakpoints as expected.

I'm not really sure how to debug this in any way. I hadn't changed any of my configurations in a long time...the only thing I can think of is maybe updating RubyMine recently a couple times in the last month maybe?

Here's the data from my "About RubyMine":

RubyMine 2019.3.3
Build #RM-193.6494.37, built on February 11, 2020
Licensed to ***************
Subscription is active until March 27, 2020
Runtime version: 11.0.5+10-b520.38 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.2
GC: ParNew, ConcurrentMarkSweep
Memory: 2014M
Cores: 4
Registry: bigger.font.in.project.view=true, debugger.watches.in.variables=false, ide.balloon.shadow.size=0
Non-Bundled Plugins: BashSupport, NodeJS, com.chrisrm.idea.MaterialThemeUI, net.seesharpsoft.intellij.plugins.csv

 

This is all I see at start up related to the debugger (I've changed some of the user/paths just for obscurity's sake). From here, it's just the normal logs from rspec/Rails. It seems like the breakpoint is noticed, but it's just not stopping at it.

Fast Debugger (ruby-debug-ide 0.8.0.beta21, debase 0.3.0.beta23, file filtering is supported, block breakpoints supported, smart steps supported, obtaining return values supported, partial obtaining of instance variables supported) listens on 0.0.0.0:62073
Connected from 127.0.0.1
29817: Starting control thread
29817: Processing in control: b /Users/user/Projects/project/spec/serializers/class_name/class_name_spec.rb:76
29817: <breakpointAdded no="1" location="/Users/user/Projects/project/spec/serializers/class/class_name_spec.rb:76"/>
29817: Processing in control: include /Users/user/Projects/project/
29817: <fileIncluded file="/Users/user/Projects/project/"/>
29817: Processing in control: exclude /Users/user/Projects/project/tmp/
29817: <fileExcluded file="/Users/user/Projects/project/tmp/"/>
29817: Processing in control: start
29817: Starting: running program script
10 comments
Comment actions Permalink

Hello Adan,

would it be possible to check also how it goes in RubyMine 2020.1 EAP with the updated debug gems?

0
Comment actions Permalink

I just tried with 2020.1 EAP and updated the debug gems there, but the breakpoints still don't seem to be catching.

0
Comment actions Permalink

Adan, just to be sure, are you using build 201.5616.16 with debase beta27?

0
Comment actions Permalink

I just updated again.

RubyMine 2020.1 EAP
Build #RM-201.5616.16, built on February 19, 2020
RubyMine EAP User
Expiration date: March 20, 2020
Runtime version: 11.0.6+8-b722.15 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.2
GC: ParNew, ConcurrentMarkSweep
Memory: 725M
Cores: 4
Registry: bigger.font.in.project.view=true, debugger.watches.in.variables=false, ide.balloon.shadow.size=0
Non-Bundled Plugins: com.chrisrm.idea.MaterialThemeUI, net.seesharpsoft.intellij.plugins.csv, NodeJS

On running Rspec:

Fast Debugger (ruby-debug-ide 0.8.0.beta21, debase 0.3.0.beta27, file filtering is supported, block breakpoints supported, smart steps supported, obtaining return values supported, partial obtaining of instance variables supported) listens on 0.0.0.0:62432

The issue still exists after updating multiple times in the last week.

0
Comment actions Permalink

Adan,

could you please specify whether

/Users/user/Projects/project/spec/serializers/class/class_name_spec.rb:76

is the correct path to the file where you wan to stop on the breakpoint? In addition, where does the breakpoint stand (in a block, rescue, etc)?

0
Comment actions Permalink

Yes, that is the right path. I am putting a break point, and clicking to run the test I put the break point on.

It is just a plain line break point.

It skips the break point whether I have the break point in the spec file, or if I have it in a class/module that the spec tests use.

Break points work if I put them in my code base, run my rails server in debug mode and send a request. They just don't work if I am running an rspec test.

Is any one aware of this being an issue or is there any reason this might have randomly broke the last 2-3 weeks, or how to get around this issue other than starting the Rails server through the command line and putting in pry breakpoints? I feel like I'm not getting any assistance on this issue right now.

0
Comment actions Permalink

Hello,

Is there any update or any way to debug this further? I am still having this issue as of updating EAP to the latest I could.


RubyMine 2020.1 EAP
Build #RM-201.5985.36, built on February 27, 2020
RubyMine EAP User
Expiration date: March 28, 2020
Runtime version: 11.0.6+8-b765.1 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.3
GC: ParNew, ConcurrentMarkSweep
Memory: 725M
Cores: 4
Registry: bigger.font.in.project.view=true, debugger.watches.in.variables=false, ide.balloon.shadow.size=0
Non-Bundled Plugins: com.chrisrm.idea.MaterialThemeUI, net.seesharpsoft.intellij.plugins.csv, BashSupport, NodeJS
Fast Debugger (ruby-debug-ide 0.8.0.beta22, debase 0.3.0.beta27, file filtering is supported, block breakpoints supported, smart steps supported, obtaining return values supported, partial obtaining of instance variables supported) listens on 0.0.0.0:57770
0
Comment actions Permalink

Hello Adan,

could you please specify whether you're running Rspec tests with coverage or not? If so then could you please try disabling it and launch debugger again?

0
Comment actions Permalink

Hi Olga,

SimpleCov seemed to be automatically configured for my project in spec_helper.rb.

Once I removed the SimpleCov configuration from my spec_helper.rb file, the breakpoints started working as expected again.

I can use this to debug for the time being until a fix can be put in on your end, thanks for the suggestion!

0
Comment actions Permalink

Thanks for checking. That issue is going to be fixed in the next EAP: https://youtrack.jetbrains.com/issue/RUBY-25997

0

Please sign in to leave a comment.