Comments (24)
Why are you trying to change default ports from 39767 and 39768 to 3000 and 3001? Just try to leave them as is and connect to localhost:3000.
Anyway, even if you want to change these ports, you shouldn't change them to port of your webserver (3000), because, well, it is busy by webserver. :)
I.e.:
39767 - port of ruby-debug-ide
39768 - port of transmitter of debugger messages (ruby script)
3000 - port of webserver (e.g., webrick).
Please try to run without changing ports and tell me about results.
Thanks! :)
from vim-ruby-debugger.
oh) sorry for my fault.
I changed ports to default:
let s:rdebug_port = 39767
let s:debugger_port = 39768
and started debugger again. Unfortunately result was the same.
And I can't connect to localhost:3000.
from vim-ruby-debugger.
Oh, sorry, you have Rails 3, right? :Rdebugger script/server doesn't work for Rails 3, standard ':Rdebugger 'rails server'' doesn't work too yet (but will work soon :)). Try to use rackup, i.e.:
:Rdebugger '/usr/bin/rackup config.ru'
from vim-ruby-debugger.
Ah. Right, you use :Rdebugger 'script/rails server'. But anyway, it doesn't work yet. Please try to use rackup for now. I will try to fix standard rails way to run Rails next weekend.
from vim-ruby-debugger.
:Rdebugger '/home/gorkunov/.rvm/gems/ree-1.8.7-2010.02@rails3/bin/rackup config.ru'
doesn't help :)
from vim-ruby-debugger.
Damn. Could you please try with Rails 2 for now, to make sure it works and problem is with Rails 3 only (or no)?
from vim-ruby-debugger.
in rails2.3.8 all the same :(
maybe plugin conflict with other?
from vim-ruby-debugger.
Did you try Rails 2.3.8 with default Ruby (not rvm)?
from vim-ruby-debugger.
without rvm plugin doesn't find ruby-debug-ide but it installed as local:
gorkunov@HAMPTON:~$ gem list
*** LOCAL GEMS ***
actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activeresource (2.3.8)
activesupport (2.3.8)
linecache (0.43)
rack (1.1.0)
rails (2.3.8)
rake (0.8.7)
ruby-debug-base (0.10.3)
ruby-debug-ide (0.4.10)
from vim-ruby-debugger.
I found solution.
In the "vim_debugger.vim" I commented lines 161-186 (and 'end' for commented if). So, now ruby-code is invoked as external script and it works ok. I checked breakpoints and they work fine.
Maybe something wrong with ruby-extenstion for vim 7.2.320? (default package in ubuntu 10.04)
from vim-ruby-debugger.
FWIW I've also run into this problem and gorkunov's solution also worked for me. For some reason the ruby-debug-ide is not getting recognized even though it is installed - not sure why?
from vim-ruby-debugger.
Hmm, no idea, and I don't know how to repeat that. :(
Anyway, I'll add some flag to disable this and add note to vim-ruby-debugger to "Troubleshooting" section.
Thank you guys for solving (well, working around :)) that bug!
from vim-ruby-debugger.
What is the status of this? Things seem to have changed in the ruby_debugger.vim file, and the lines mentioned above don't make sense. Can a patch be posted with the solution, or did the flag get entered into the code? I can't run the debugger with rails 3.
I assume that running :Rdebugger 'rails server' is supposed to start the server on port 3000, as well as the rdebug listener on its own port?
from vim-ruby-debugger.
@simmerz:
You don't have to edit lines in the ruby_debugger.vim, you have to add
let g:ruby_debugger_builtin_sender = 0
to your .vimrc. Not sure it will help you though, you should better update your vim-ruby-debugger version to the last one, set
let g:ruby_debugger_debug_mode = 1
in your .vimrc, try to run the server and e.g. set a breakpoint and send me your log file from ~/.vim/tmp/ruby_debugger_log then.
from vim-ruby-debugger.
@astashov http://pastebin.com/ZM8DHEY1
It does now appear to run the server, but it doesn't break. I'm running :Rdebugger 'rails s'
from vim-ruby-debugger.
Aha, I see how it runs 'rails s', how it adds a breakpoint, then rdebug-ide responds that breakpoint was successfully added. (btw, why do you run /sbin/stop?)
What do you do next? You open the page with home_controller.rb in the browser and it isn't stopped on the breakpoint you set, right?
Also, could you please try to run :Rdebugger and only then place a breakpoint and send me logs?
Thanks!
from vim-ruby-debugger.
I didn't run /sbin/stop! I opened the page with the breakpoint of the first line inside the method (def index; @search = Search.new; end) and it doesn't stop, and instead shows me the page. Even if I put a "puts 'foo'" after that @search = line, it outputs "foo".
from vim-ruby-debugger.
Oh, I know where that stop command came from. I ran Rdebugger stop :D
from vim-ruby-debugger.
Hmm, it's strange - by some reason ruby_debugger.rb sends message to rdebug-ide, but rdebug-ide doesn't respond by confirmation . Could you please repeat again, and then also send ruby_debugger_output and ruby_debugger?
(BTW, you use Ruby 1.8.7, don't you?)
Thanks!
from vim-ruby-debugger.
Yes, using Ubuntu's Ruby 1.8.7
ruby_debugger doesn't exist and ruby_debugger_output is here: http://pastebin.com/s3gT5dah
ruby_debugger_log: http://pastebin.com/D5pkgdrx
from vim-ruby-debugger.
By some reason rdebug-ide doesn't respond.
Could you please also try :Rebugger 'script/rails server'?
If it doesn't work too, could you please test it manually? For this, open a terminal, go to the app's root dir and run:
$ rdebug-ide -p 39767 -- '/usr/bin/rails server'
Then, open another terminal window, and run irb there. Try to execute these commands:
>> require 'socket'
=> true
>> a = TCPSocket.open('127.0.0.1', 39767)
=> #<TCPSocket:0x10171dfe8>
>> a.puts(%q[start])
=> nil
>> a.puts(%q[break /home/simmerz/Projects/247seas/thewaypoint/app/controllers/home_controller.rb:5])
=> nil
>> b = select([a], nil, nil)
=> [[#<TCPSocket:0x10171dfe8>], [], []]
>> b[0][0].recv(1000)
=> "<breakpointAdded no=\"1\" location=\"/home/simmerz/Projects/247seas/thewaypoint/app/controllers/home_controller.rb:5\"/>"
If you receive <breakpointAdded>, then it means rdebug-ide responds successfully.
You should be able to open the page in the browser with your breakpoint and then execute these commands in irb session:
>> b[0][0].recv(1000)
=> "<breakpoint file=\"/home/simmerz/Projects/247seas/thewaypoint/app/controllers/home_controller.rb\" line=\"5\" threadId=\"3\"/>"
<breakpoint> means it was successfully stopped at the breakpoint.
Can you try to repeat that?
Thanks!
from vim-ruby-debugger.
Also, could you please run:
$ ps -ef | grep ruby
and make sure the 'ruby_debugger.rb' and 'rdebug-ide' processes are there. If you don't see the rdebug-ide process, but see usual ruby process which is running Rails server, please try to run debugger by
:Rdebugger 'script/rails server'
Thanks!
from vim-ruby-debugger.
We have success. :Rdebugger 'script/rails server' seems to work :)
Tom
from vim-ruby-debugger.
Hooray! I've just met the same issue you met before - the strange thing - if you open "rdebug-ide -- /usr/bin/rails server", rdebug-ide will be converted to usual "/usr/bin/rails server" (as you can see in the processes list, ps -ef). That is pretty strange behavior of the rdebug-ide gem, and for now I've got no idea why it happens.
from vim-ruby-debugger.
Related Issues (20)
- Screenshot is broken HOT 4
- Rdebugger calls vim instead of mvim and fails --servername HOT 5
- Debugger is not running HOT 22
- RdbStop not working HOT 10
- Caught deadly signal ABRT HOT 2
- Debuger not start HOT 2
- Not hit breakpoint on Linux HOT 50
- debugger errors at every command HOT 5
- Debugger terminates HOT 10
- "VIM not found" debugger wont start server HOT 8
- Can't debug because 'builder' gem is loaded HOT 7
- `:Rdebugger` does not return HOT 1
- Windows support HOT 2
- Customize window positions (variables, breakpoints, etc..)
- Weird error HOT 2
- Is it working under ruby 2.0.0? HOT 6
- Не запускается debugger HOT 4
- Могу ли я использовать дебаггер, когда я запускаю задачи через tpope/vim-rake ? HOT 1
- Don't running RdbTest HOT 2
- Unable to run a simple rb file and getting an error trying to run debugger
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 vim-ruby-debugger.