Comments (3)
STDIN from pipe will not work because Reline needs input.
$ echo p 1 | exe/rdbg
# No sourcefile available for -
=>#0 <main> at -:1
#<Thread:0x00007f42ded32368@DEBUGGER__::SESSION@server /home/ko1/ruby/debug/lib/debug/session.rb:179 run> terminated with exception (report_on_exception is true):
/home/ko1/ruby/install/trunk/lib/ruby/3.3.0+0/reline/ansi.rb:152:in `raw': Inappropriate ioctl for device (Errno::ENOTTY)
BTW remote debugging works fine.
[master]$ echo p 1 | exe/rdbg -O
DEBUGGER: Debugger can attach via UNIX domain socket (/run/user/1000/rdbg-3543)
DEBUGGER: wait for debugger connection...
DEBUGGER: Connected.
1
DEBUGGER: Disconnected.
hmm. can be used by pipe command line tool?
from debug.
I agree that showing help
is better 👍
from debug.
But I think nobody use this feature
I would use it if it worked, to debug Rack/Puma on the fly:
$ echo 'app { |env| require "debug";debugger;[200, {}, ["OK"]] }' | puma --config /dev/stdin --port 0
Puma starting in single mode...
* Puma version: 6.4.2 (ruby 3.2.4-p170) ("The Eagle of Durango")
* Min threads: 0
* Max threads: 5
* Environment: development
* PID: 60630
* Listening on http://0.0.0.0:51168/
Use Ctrl-C to stop
# No sourcefile available for /dev/stdin
=>#0 block {|env={"rack.version"=>[1, 6], "rack.errors"=>...|} in _load_from at /dev/stdin:1
#1 Puma::Configuration::ConfigMiddleware#call(env={"rack.version"=>[1, 6], "rack.errors"=>...) at ~/.arm64_rubies/3.2.4/lib/ruby/gems/3.2.0/gems/puma-6.4.2/lib/puma/configuration.rb:272
# and 6 frames (use `bt' command for all frames)
▽#<Thread:0x0000000104ce37b8@DEBUGGER__::SESSION@server /Users/dentarg/.arm64_rubies/3.2.4/lib/ruby/gems/3.2.0/gems/debug-1.9.2/lib/debug/session.rb:179 run> terminated with exception (report_on_exception is true):
/Users/dentarg/.arm64_rubies/3.2.4/lib/ruby/gems/3.2.0/gems/reline-0.5.3/lib/reline/ansi.rb:284:in `pread': not opened for reading (IOError)
...
from debug.
Related Issues (20)
- LocalJumpError: break from proc-closure on typo in debug prompt HOT 2
- Setting breaking points with absolute path fails from nvim-dap and rdbg on Docker container HOT 1
- binding.b doesn't stop code on second controller request and above
- History not available
- Setting the irb_console configuration true has no effect HOT 1
- <enter> does not repeat last command in irb_console mode.
- Proposal: reverse continue
- Feat/Bug: Set the value of `_` (underscore) to the value of the last ruby expression HOT 3
- Slow print (STDOUT) of large objects
- Question: Could not load source 'Fastfile': not found, while debugging a Fastlane lane from VSCODE
- Remove usage of deprecated constant IRB::InputCompletor
- `!!!` to fast forward breakpoints like in pry HOT 5
- Large data output HOT 1
- Add a shorter alias for the whereami command HOT 1
- Could not find valid gem HOT 1
- Cut a new release for the Rails stdin bug HOT 2
- Keystrokes between `debugger` sessions seem to persist HOT 4
- after_fork_parent method waits for all child processes to stop HOT 2
- Having to specify bundle exec twice HOT 2
- The console become frozen while debugging in Rails HOT 1
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 debug.