Comments (5)
I was unable to reproduce the problem :( Could you please run debugger in verbose mode and provide debugger's output.
from ruby-debug-ide.
Please can you write exactly what I should do because I'm not familiar with the debugger. I use it only within die IDE.
from ruby-debug-ide.
In RubyMine go to Settings|Debugger|Ruby and enable debugger's verbose output.
from ruby-debug-ide.
What I have done:
first variant: Using the name 'print_array' in the script.
1: I've started debugging the script. It stopped at the first breakpoint and the variable names appeared in the variables view.
2: I opened the array 'sample_ary' in the variables view to see the content of the array element. Now the script RESUMED IMMEDIATELY and stopped at the second breakpoint. The variables view showed 'collecting data' as described in the first message. After some seconds the variable names appeared in the variables view.
3: same as 2
verbose debug output:
/usr/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/walter/.gem/ruby/1.9.1/gems/ruby-debug-ide-0.4.23.beta1/bin/rdebug-ide --debug --disable-int-handler --port 56333 --dispatcher-port 46852 -- /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb
Fast Debugger (ruby-debug-ide 0.4.23.beta1, ruby-debug-base19x 0.11.30.pre15) listens on 127.0.0.1:56333
Connected from 127.0.0.1
29147: Starting control thread
29147: Processing in control: b /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:22
29147: <breakpointAdded no="1" location="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:22"/>
29147: Processing in control: b /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:21
29147: <breakpointAdded no="2" location="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:21"/>
29147: Processing in control: b /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:20
29147: <breakpointAdded no="3" location="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:20"/>
29147: Processing in control: start
29147: Starting: running program script
29147: <breakpoint file="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb" line="20" threadId="1"/>
29147: Stopping Thread #<Thread:0x000000024860f0> (29147)
29147: Threads equal: true
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in context: th in 1
29147: Processing in context: w
29147: <frames>
29147: <frame no='1' file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='20' current='true' />
29147: </frames>
29147: Processing in context: th in 1
29147: Processing in context: frame 1
29147: Selected frame no 0
29147: Processing in context: v l
29147: <variables>
29147: <variable name="sample_ary" kind="local" value="Array (2 element(s))" type="Array" hasChildren="true" objectId="+0x14c8ab4"/>
29147: <variable name="sample_hsh" kind="local" value="Hash (2 element(s))" type="Hash" hasChildren="true" objectId="+0x14c8a8c"/>
29147: <variable name="sample_str" kind="local" value="sample string" type="String" hasChildren="true" objectId="+0x14c8aa0"/>
29147: </variables>
Breakpoint 1
29147: Processing in context: th in 1
29147: Processing in context: frame 1
29147: Selected frame no 0
29147: Processing in context: v i +0x14c8ab4
29147: <breakpoint file="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb" line="21" threadId="1"/>
29147: Stopping Thread #<Thread:0x000000024860f0> (29147)
29147: Threads equal: true
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in context: th in 1
29147: Processing in context: w
29147: <frames>
29147: <frame no='1' file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='21' current='true' />
29147: </frames>
29147: Processing in context: th in 1
29147: Processing in context: frame 1
29147: Selected frame no 0
29147: Processing in context: v l
29147: <variables>
29147: <variable name="sample_ary" kind="local" value="Array (2 element(s))" type="Array" hasChildren="true" objectId="+0x14c8ab4"/>
29147: <variable name="sample_hsh" kind="local" value="Hash (2 element(s))" type="Hash" hasChildren="true" objectId="+0x14c8a8c"/>
29147: <variable name="sample_str" kind="local" value="sample string" type="String" hasChildren="true" objectId="+0x14c8aa0"/>
29147: </variables>
Breakpoint 2
29147: Processing in context: th in 1
29147: Processing in context: frame 1
29147: Selected frame no 0
29147: Processing in context: v i +0x14c8ab4
29147: <breakpoint file="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb" line="22" threadId="1"/>
29147: Stopping Thread #<Thread:0x000000024860f0> (29147)
29147: Threads equal: true
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in context: th in 1
29147: Processing in context: w
29147: <frames>
29147: <frame no='1' file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='22' current='true' />
29147: </frames>
29147: Processing in context: th in 1
29147: Processing in context: frame 1
29147: Selected frame no 0
29147: Processing in context: v l
29147: <variables>
29147: <variable name="sample_ary" kind="local" value="Array (2 element(s))" type="Array" hasChildren="true" objectId="+0x14c8ab4"/>
29147: <variable name="sample_hsh" kind="local" value="Hash (2 element(s))" type="Hash" hasChildren="true" objectId="+0x14c8a8c"/>
29147: <variable name="sample_str" kind="local" value="sample string" type="String" hasChildren="true" objectId="+0x14c8aa0"/>
29147: </variables>
Breakpoint 3
29147: Processing in context: th in 1
29147: Processing in context: frame 1
29147: Selected frame no 0
29147: Processing in context: v i +0x14c8ab4
Process finished with exit code 0
second variant: Using the name 'print_array_' in the script, which causes the debugging to run as I expected.
1: I've started debugging the script. It stopped at the first breakpoint and the variable names appeared in the variables view.
2: I opened the array 'sample_ary' in the variables view to see the content of the array element. Now elements appeared in the variables view. Stepping over (F8), the script resumed and stopped at the second breakpoint.
3: same as 2
verbose debug output:
/usr/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/walter/.gem/ruby/1.9.1/gems/ruby-debug-ide-0.4.23.beta1/bin/rdebug-ide --debug --disable-int-handler --port 34565 --dispatcher-port 46559 -- /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb
Fast Debugger (ruby-debug-ide 0.4.23.beta1, ruby-debug-base19x 0.11.30.pre15) listens on 127.0.0.1:34565
Connected from 127.0.0.1
29195: Starting control thread
29195: Processing in control: b /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:22
29195: <breakpointAdded no="1" location="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:22"/>
29195: Processing in control: b /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:21
29195: <breakpointAdded no="2" location="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:21"/>
29195: Processing in control: b /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:20
29195: <breakpointAdded no="3" location="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:20"/>
29195: Processing in control: start
29195: Starting: running program script
29195: <breakpoint file="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb" line="20" threadId="1"/>
29195: Stopping Thread #<Thread:0x000000020760f0> (29195)
29195: Threads equal: true
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in context: th in 1
29195: Processing in context: w
29195: <frames>
29195: <frame no='1' file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='20' current='true' />
29195: </frames>
29195: Processing in context: th in 1
29195: Processing in context: frame 1
29195: Selected frame no 0
29195: Processing in context: v l
29195: <variables>
29195: <variable name="sample_ary" kind="local" value="Array (2 element(s))" type="Array" hasChildren="true" objectId="+0x12c099c"/>
29195: <variable name="sample_hsh" kind="local" value="Hash (2 element(s))" type="Hash" hasChildren="true" objectId="+0x12c0974"/>
29195: <variable name="sample_str" kind="local" value="sample string" type="String" hasChildren="true" objectId="+0x12c0988"/>
29195: </variables>
29195: Processing in context: th in 1
29195: Processing in context: frame 1
29195: Selected frame no 0
29195: Processing in context: v i +0x12c099c
29195: <variables>
29195: <variable name="[0]" kind="instance" value="1" type="Fixnum" hasChildren="false" objectId="+0x3"/>
29195: <variable name="[1]" kind="instance" value="2" type="Fixnum" hasChildren="false" objectId="+0x5"/>
29195: </variables>
29195: Processing in context: th in 1
29195: Processing in context: frame 1
29195: Selected frame no 0
29195: Processing in context: next
29195: Resumed Thread #<Thread:0x000000020760f0>
29195: <suspended file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='21' threadId='1' frames='1'/>
29195: Stopping Thread #<Thread:0x000000020760f0> (29195)
29195: Threads equal: true
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
Breakpoint 1
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in context: th in 1
29195: Processing in context: w
29195: <frames>
29195: <frame no='1' file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='21' current='true' />
29195: </frames>
29195: Processing in context: th in 1
29195: Processing in context: frame 1
29195: Selected frame no 0
29195: Processing in context: v l
29195: <variables>
29195: <variable name="sample_ary" kind="local" value="Array (2 element(s))" type="Array" hasChildren="true" objectId="+0x12c099c"/>
29195: <variable name="sample_hsh" kind="local" value="Hash (2 element(s))" type="Hash" hasChildren="true" objectId="+0x12c0974"/>
29195: <variable name="sample_str" kind="local" value="sample string" type="String" hasChildren="true" objectId="+0x12c0988"/>
29195: </variables>
29195: Processing in context: th in 1
29195: Processing in context: frame 1
29195: Selected frame no 0
29195: Processing in context: v i +0x12c099c
29195: <variables>
29195: <variable name="[0]" kind="instance" value="1" type="Fixnum" hasChildren="false" objectId="+0x3"/>
29195: <variable name="[1]" kind="instance" value="2" type="Fixnum" hasChildren="false" objectId="+0x5"/>
29195: </variables>
29195: Processing in context: th in 1
29195: Processing in context: frame 1
29195: Selected frame no 0
29195: Processing in context: next
29195: Resumed Thread #<Thread:0x000000020760f0>
29195: <suspended file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='22' threadId='1' frames='1'/>
29195: Stopping Thread #<Thread:0x000000020760f0> (29195)
29195: Threads equal: true
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
Breakpoint 2
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in context: th in 1
29195: Processing in context: w
29195: <frames>
29195: <frame no='1' file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='22' current='true' />
29195: </frames>
29195: Processing in context: th in 1
29195: Processing in context: frame 1
29195: Selected frame no 0
29195: Processing in context: v l
29195: <variables>
29195: <variable name="sample_ary" kind="local" value="Array (2 element(s))" type="Array" hasChildren="true" objectId="+0x12c099c"/>
29195: <variable name="sample_hsh" kind="local" value="Hash (2 element(s))" type="Hash" hasChildren="true" objectId="+0x12c0974"/>
29195: <variable name="sample_str" kind="local" value="sample string" type="String" hasChildren="true" objectId="+0x12c0988"/>
29195: </variables>
29195: Processing in context: th in 1
29195: Processing in context: frame 1
29195: Selected frame no 0
29195: Processing in context: v i +0x12c099c
29195: <variables>
29195: <variable name="[0]" kind="instance" value="1" type="Fixnum" hasChildren="false" objectId="+0x3"/>
29195: <variable name="[1]" kind="instance" value="2" type="Fixnum" hasChildren="false" objectId="+0x5"/>
29195: </variables>
29195: Processing in context: th in 1
29195: Processing in context: frame 1
29195: Selected frame no 0
29195: Processing in context: next
29195: Resumed Thread #<Thread:0x000000020760f0>
29195: <suspended file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/-e' line='1' threadId='1' frames='1'/>
29195: Stopping Thread #<Thread:0x000000020760f0> (29195)
29195: Threads equal: true
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
Breakpoint 3
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in context: th in 1
29195: Processing in context: w
29195: <frames>
29195: <frame no='1' file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/-e' line='1' current='true' />
29195: </frames>
from ruby-debug-ide.
Ok, so the problematic code is https://github.com/ruby-debug/ruby-debug-ide/blob/master/lib/ruby-debug-ide/commands/variables.rb#L82-L88 These lines are supposed to call methods declared in https://github.com/ruby-debug/ruby-debug-ide/blob/master/lib/ruby-debug-ide/xml_printer.rb and this is done by some Ruby meta/magic programming (https://github.com/ruby-debug/ruby-debug-ide/blob/master/lib/ruby-debug-ide/command.rb#L78-L84)
And it looks like the magic doesn't work correctly :(
The simple fix is to call all these methods on self
, but it would be better to figure out what is wrong with current approach and fix it (if you know what the problem is PR is welcome ;)
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.