[Rails] The problem that pry-byebug does not stop through breakpoints

Development environment

Docker: v19.03.13 Ruby: v2.5.7 Rails: v5.2.4.4 pry: v0.13.1 pry-byebug: v3.9.0 PostgreSQL: psql (PostgreSQL) 13.0 (Debian 13.0-1.pgdg100+1)

Contents

In the Docker environment, I introduced Gem Pry-byebug of Ruby on Rails, stopped processing and checked variables, parameters, and processing flow, but it suddenly stopped. .. .. Really. suddenly. In the display on the console, the => mark is attached at the breakpoint, but as shown below, it does not stop and the rendering starts through the breakpoint. スクリーンショット 2020-10-14 9.47.02.png [1] pry (# <HomesController>)> and the part where you can enter commands at the time of debugging are also displayed, but even though you have not done anything, it is passed through and rendered ... It was my first behavior, so I looked it up on the internet, but there was no information anywhere, and I was addicted to it for about two days ...

solution

From the conclusion, it works normally by deleting tmp directly under the application root folder. I wondered why I deleted the tmp folder, but when I was looking at the information including other languages on the net, I found out that the cache was saved in tmp, and said, "If this effect causes a problem. Is it happening ?? If it's a cache, it's okay to delete it ?? It's managed by Git, and if something goes wrong, I should return it ... ", and I tried deleting it. Lol tmp refers to Temporary File (= temporary file) ... It will be a study. Lol You got a hint from the naming of folders and files like this. I felt that it was important to know the meaning.

Even if you look at the Rails guide, it says that it is also a folder that stores action cache etc. However, what I think failed is the Rails guide

Empty tmp / cache with rails tmp: cache: clear. Empty tmp / sockets with rails tmp: sockets: clear. Empty tmp / screenshots with rails tmp: screenshots: clear. With rails tmp: clear, empty the cache, sockets and screenshot directories. Rails tmp: create creates tmp directories for cache, sockets and pids.

It was stated.

I regret that I could have deepened my understanding if I could execute this command to separate the folders instead of deleting them all at once. I couldn't figure out the cause because it returned to normal operation, but I hope you can try it if you find yourself in a similar situation.

Recommended Posts

[Rails] The problem that pry-byebug does not stop through breakpoints
[Rails] Solving the problem that session timeout does not work
How to fix the problem that Aptana Studio does not start
About the problem that the server can not be started with rails s
When the server does not start with rails s
How to solve the problem that the website image is not displayed after deploying to heroku on Rails 5
[Firebase] The problem that the currentUser of Firebase Auth does not become null even if the app is uninstalled.
About the problem that the image is not displayed after AWS deployment
Solved the problem that the scroll event did not fire in JQuery
[Rails] What to do when rails s does not respond or does not stop
The story that the build error did not stop when using Eclipse 2020
How to interact with a server that does not crash the app
The problem that the contents of params are completely displayed in the [Rails] view
[Rails] About the error that the image is not displayed in the production environment
[Rails] Video does not play with video_tag
JavaScript (vanilla) does not respond in Rails.
What to do when rails db: seed does not reflect in the database
[Error] How to resolve the event that the screen does not transition after editing
Setting method that the size does not change even if CSS is changed
[Rails] About the problem that the video thumbnail automatically created by FFmpeg is not displayed [AWS S3 + EC2 + CarrierWave + Fog]
The problem that the JDK set in JAVA_HOME does not appear even if java -version is performed at the command prompt