Comments (7)
I'm facing a very similar problem of debugging against a Rails application in a container. I appreciate that there is a workaround using SSH (and will investigate that path), but I also think the ability to control which ports are used for child process debugging could be a useful feature. Is that firmly not the direction you want to take ruby-debug-ide, or would you consider the the proposed solution @caleb presented in his commit? Container development often has a philosophy of minimal containers with minimal services, so having an SSH service readily available is not as much as a given as it would be for typical remote server integrations.
from ruby-debug-ide.
I agree, this would be useful option - I actually figured out the same solution even before I ran into this issue. There was a problem with debugging session hanging and I tracked it down to this subprocess spawning and opening a random port, to which RubyMine had no access (because I'm also using Docker container with only certain ports being forwarded).
I'm looking into SSH solution, but I don't really understand how it works with ruby-debug-ide - @caleb since you figured it out could you share some tips?
Having a list of ports supplied to ruby-debug-ide instead of picking random port wouldn't hurt as an additional functionality though. It can fallback to random ports once the pool is exhausted, and it will probably require returning ports to the pool if process exits, so it may require a bit more work to be robust and bullet-proof.
PS. Actually setting SSHD connection to Docker container is not that trivial either :(
from ruby-debug-ide.
Have you tried adding ruby from your container via remote interpreter integration? It will require only one open port for SSH connection and will push all required connections via SSH tunnel
from ruby-debug-ide.
@denofevil I haven't. I saw that that was a thing, but didn't quite understand it. So I would have to add SSH to my container and then use RubyMine to launch my Unicorn server (using the remote ruby) and it would just do the right thing?
Would that mean I wouldn't need this gem?
from ruby-debug-ide.
@caleb, yes, you'll need just SSH to your container. The gem will be installed automatically and you won't need to specify port settings manually
from ruby-debug-ide.
Cool! I'll give that a whirl. Thanks!
UPDATE: This is very cool once I got it set up!
from ruby-debug-ide.
I posted a potential workaround that does not involve setting up SSH in your Docker container in issue #107:
from ruby-debug-ide.
Related Issues (20)
- Debugger fails on apple m1 HOT 2
- Ruby Remote Debug Can Cause Arbitrary Remote Code Execution
- "daemon not healthy" on fresh install
- Undefined method 'index' for nil:NilClass @ /usr/local/bundle/ruby/2.6.0/gems/debase-0.2.4.1/lib/debase/context.rb:35:in `at_line' HOT 2
- Segmentation fault in Ruby 3.1.0 / RubyMine debugger HOT 6
- Nix incompatibility
- Can't debug Rails server old version 3.2.22.5, VSCode 1.64.2
- Uncaught exception - rdebug-ide fails to initialize superclass
- ruby 3,symbol not found in flat namespace '_RHASH_EMPTY_P'
- Support the "logpoint" breakpoint variant
- Question: How to use ruby-debug-ide with unicorn? How to use --attach-mode?
- --skip-wait-for-start makes certain files not to stop more than once HOT 1
- When started without breakpoints, only pauses code execution once
- How to start the debugger from Ruby? (Also: How to set a breakpoint in HAML?) HOT 2
- rdebug-ide is getting stuck when executing `notify_dispatcher_if_needed`
- Migrate tests to GHA
- irb 1.6.4
- Issue with bundle install with Rails 7.0 & Ruby 3.2 on Docker MacOS M1 HOT 2
- Debugger hits all breakpoints once then stops HOT 1
- Incompatibility with ruby 3.3.0 on Sonoma? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-debug-ide.