Hi all, I followed the excellent instructions by Brian Hogan for setting up Eclipse/RDT for rails, and have a quick question. When I run WEBrick as an external tool nothing shows up in the the eclipse console window (although it responds correctly through the browser). It just says that WEBrick is running. Any ideas how I can get the logging output (which comes up normally in the command prompt) to show up? Thanks, Abdullah
Abdullah, I''ve also followed Brians excellent Howto. AFAIR, I had to "Install Web Developer Tools Plugin for Eclipse" for the console to work Hubertus Abdullah Jibaly schrieb:>Hi all, > >I followed the excellent instructions by Brian Hogan for setting up Eclipse/RDT for rails, and >have a quick question. When I run WEBrick as an external tool nothing shows up in the the eclipse >console window (although it responds correctly through the browser). It just says that WEBrick is >running. Any ideas how I can get the logging output (which comes up normally in the command >prompt) to show up? > >Thanks, >Abdullah >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > > >
Do you have the url to this tutorial ? I would like to read it. I run wekbrick as a ruby application (vs running it as an external application) using RDT ( http://rubyeclipse.sf.net ) and had to add $stdout.sync=true $stderr.sync=true at the beginning of the script/server file for the logs to show up correctly in the console (otherwise they would appear once in a while but inconsistently ...) Jean On 10/3/05, Hubertus Hiden <hubertus-5xQ4IkOJ+aHYtjvyW6yDsg@public.gmane.org> wrote:> Abdullah, > > I''ve also followed Brians excellent Howto. > AFAIR, I had to "Install Web Developer Tools Plugin for Eclipse" for the > console to work > > Hubertus > > Abdullah Jibaly schrieb: > > >Hi all, > > > >I followed the excellent instructions by Brian Hogan for setting up Eclipse/RDT for rails, and > >have a quick question. When I run WEBrick as an external tool nothing shows up in the the eclipse > >console window (although it responds correctly through the browser). It just says that WEBrick is > >running. Any ideas how I can get the logging output (which comes up normally in the command > >prompt) to show up? > > > >Thanks, > >Abdullah > >_______________________________________________ > >Rails mailing list > >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
In article <20051003010422.62745.qmail-+B/3/lhHEv+A/QwVtaZbd3CJp6faPEW9@public.gmane.org>, amjibaly-/E1597aS9LQAvxtiuMwx3w@public.gmane.org says...> I followed the excellent instructions by Brian Hogan for setting up Eclipse/RDT for rails, and > have a quick question. When I run WEBrick as an external tool nothing shows up in the the eclipse > console window (although it responds correctly through the browser). It just says that WEBrick is > running. Any ideas how I can get the logging output (which comes up normally in the command > prompt) to show up?I have the same problem... unfortunately, since Brian doesn''t, he didn''t know how to solve it :) -- Jay Levitt | Wellesley, MA | I feel calm. I feel ready. I can only Faster: jay at jay dot fm | conclude that''s because I don''t have a http://www.jay.fm | full grasp of the situation. - Mark Adler
Hi,> I followed the excellent instructions by Brian Hogan for setting up > Eclipse/RDT for rails, and > have a quick question. When I run WEBrick as an external tool nothing > shows up in the the eclipse > console window (although it responds correctly through the browser).It> just says that WEBrick is > running. Any ideas how I can get the logging output (which comes up > normally in the command > prompt) to show up?That tutorial is out of date now (as far as I know), since RDT 0.6.0 has just been released. You should be able to run the script/server as a ruby application - not an external tool. That way the output should show in the console. Running ruby applications in the console on Eclipse has a known "bug" where the stdout and stderr don''t always show up right away or necessarily in order. You''ll need to add the following to force the output to be flushed to the console: $stdout.sync=true $stderr.sync=true This last piece of advice holds true for all ruby scripts run via Eclipse''s console. If anyone has a good idea how we can avoid this in RDT, I''m all ears. Thanks, Chris --- http://cwilliams.textdriven.com
I''ll add this to the tutorial $stdout.sync=true $stderr.sync=true and investigate rewriting the rest of it to conincide with the new RDT release. The other ones I have as "externals" do not cause the problem (Generate model, generate scaffold, etc) seem to work as expected. "You should be able to run the script/server as a ruby application - not an external tool." Not sure about that, because I like the ability to promt the user for scaffold names, things like that. I''m sure it would work for the WEBrick server, but having it all under one menu might be easier provided that it works well. Not trying to undermine RDT at all, just trying to be productive :) On 10/3/05, Williams, Chris <Chris.Williams-yLTBD9Em4aGakBO8gow8eQ@public.gmane.org> wrote:> > Hi, > > > I followed the excellent instructions by Brian Hogan for setting up > > Eclipse/RDT for rails, and > > have a quick question. When I run WEBrick as an external tool nothing > > shows up in the the eclipse > > console window (although it responds correctly through the browser). > It > > just says that WEBrick is > > running. Any ideas how I can get the logging output (which comes up > > normally in the command > > prompt) to show up? > > That tutorial is out of date now (as far as I know), since RDT 0.6.0 has > just been released. You should be able to run the script/server as a > ruby application - not an external tool. That way the output should show > in the console. Running ruby applications in the console on Eclipse has > a known "bug" where the stdout and stderr don''t always show up right > away or necessarily in order. You''ll need to add the following to force > the output to be flushed to the console: > > $stdout.sync=true > $stderr.sync=true > > This last piece of advice holds true for all ruby scripts run via > Eclipse''s console. If anyone has a good idea how we can avoid this in > RDT, I''m all ears. > > Thanks, > Chris > --- > http://cwilliams.textdriven.com > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
It shouldn''t be out of date.... at least it is still useful for rails developement... http://www.napcs.com/howto/railsonwindows.html On 10/3/05, Brian Hogan <bphogan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''ll add this to the tutorial > > $stdout.sync=true > $stderr.sync=true > > and investigate rewriting the rest of it to conincide with the new RDT > release. The other ones I have as "externals" do not cause the problem > (Generate model, generate scaffold, etc) seem to work as expected. > > "You should be able to run the script/server as a > ruby application - not an external tool." > > Not sure about that, because I like the ability to promt the user for > scaffold names, things like that. I''m sure it would work for the WEBrick > server, but having it all under one menu might be easier provided that it > works well. > > Not trying to undermine RDT at all, just trying to be productive :) > > > > On 10/3/05, Williams, Chris <Chris.Williams-yLTBD9Em4aGakBO8gow8eQ@public.gmane.org> wrote: > > > > Hi, > > > > > I followed the excellent instructions by Brian Hogan for setting up > > > Eclipse/RDT for rails, and > > > have a quick question. When I run WEBrick as an external tool nothing > > > shows up in the the eclipse > > > console window (although it responds correctly through the browser). > > It > > > just says that WEBrick is > > > running. Any ideas how I can get the logging output (which comes up > > > normally in the command > > > prompt) to show up? > > > > That tutorial is out of date now (as far as I know), since RDT 0.6.0 has > > just been released. You should be able to run the script/server as a > > ruby application - not an external tool. That way the output should show > > > > in the console. Running ruby applications in the console on Eclipse has > > a known "bug" where the stdout and stderr don''t always show up right > > away or necessarily in order. You''ll need to add the following to force > > the output to be flushed to the console: > > > > $stdout.sync=true > > $stderr.sync=true > > > > This last piece of advice holds true for all ruby scripts run via > > Eclipse''s console. If anyone has a good idea how we can avoid this in > > RDT, I''m all ears. > > > > Thanks, > > Chris > > --- > > http://cwilliams.textdriven.com > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Should it be possible to run Webbrick through the RDT debugger? I have never managed to get it to work (get a DrbServerNotFound in drb.rb). /Marcus
On 10/3/05, marcus <m-lists-XIjiVMmf7g3LoDKTGw+V6w@public.gmane.org> wrote:> Should it be possible to run Webbrick through the RDT debugger? I have > never managed to get it to work (get a DrbServerNotFound in drb.rb). >If you ignore all the raised exceptions you will end up stepping through your breakpoints, but I am not so sure it is useful .. The DrbServerNotFound also happens when you try running ruby -rdebug on script\server ... not sure why (did not investigate either) jean
Jean Helou wrote:> If you ignore all the raised exceptions you will end up stepping > through your breakpoints, but I am not so sure it is useful .. >Why wouldn''t it be useful? Sometimes when debugging something in a java web app I point Eclipse remote debugger to Tomcat and then I can pause execution and inspect (and then follow) the state of the request handling. Very useful. I think it would be very useful if I could do the same with Rails. Or am I missing something here? /Marcus
Well, what I do, and I have not put this in the article yet.... Add a new external command that runs the script/breakpointer service. Start up the web server, start up the breakpointer and then set your breakpoints. - Select Run -> External Tools -> External Tools - Select *New* to create a new program - Enter "Start BreakPointerk" as the name - Enter *C:\ruby\bin\ruby.exe* for the Location - For the Working Directory, use *${project_loc}* - Enter *script\breakpointer *for the *Arguments* - Select the *refresh* tab and check *Refresh Resources Upon Completion* - Select the *Common* tab - Find the section for *Display in Favorites Menu* - Check the box next to *External Tools* - *Make sure "Allocate Console" is checked! * - Select *Apply* Start up WEBrick, start up the Breakpointer and then insert breakpoint somewhere in your code. Then hit your page in a browser and watch the console in Eclipse! You''ll now be able to interact with your session, form, and other variables! I haven''t figured out how to step around, but this is a huge help. I''m adding this to the rest of the document. On 10/3/05, marcus <m-lists-XIjiVMmf7g3LoDKTGw+V6w@public.gmane.org> wrote:> > > Jean Helou wrote: > > If you ignore all the raised exceptions you will end up stepping > > through your breakpoints, but I am not so sure it is useful .. > > > Why wouldn''t it be useful? > > Sometimes when debugging something in a java web app I point Eclipse > remote debugger to Tomcat and then I can pause execution and inspect > (and then follow) the state of the request handling. Very useful. I > think it would be very useful if I could do the same with Rails. Or am I > missing something here? > > /Marcus > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I guess that is one way of doing it. But you aren''t really using the RDT debugger. When using a "GUI debugger" (as I see it) you can often add watches for certain variables, create expressions etc and see them change as you move along the execution. I haven''t been exploring the RDT debugger (since I haven''t gotten it to work) that much so I don''t know if it''s even possible in "normal" Ruby apps to do that. I haven''t really explored the breakpointer either so please enlighten me if it''s possible to do the equivalent with the same ease of use (ie, without a lot of typing commands to step over, into, resume, typing "breakpoint" *in the source* etc) and overview (watching several variables and expressions of interest at once). What I do have noticed is that you need to connect the breakpointer if you have added breakpoints to the code (the server always halts on the breakpoints whether you have the breakpointer connected or not) and that is very annoying (ie you have to remove them when you''re done and then add them again when you go into the next session). Am I missing something very obvious here? I''ve tried to find a good tutorial/reference on the Ruby debugger but haven''t. The closest I found is the "sample session" in Programming Ruby but that isn''t really a reference. And RubyGarden says I can type "h" to get help but then I get a nice stacktrace telling me "h" doesn''t exist. "list" seems to work but it''s a long and, at least for a person as stupid as me, totally unparsable line. Also, the tab completion doesn''t seem to work for me when in breakpointer mode (as it does when using IRB). Is it my setup or is it normal behaviour? /Marcus
On 10/3/05, marcus <m-lists-XIjiVMmf7g3LoDKTGw+V6w@public.gmane.org> wrote:> > Am I missing something very obvious here? I''ve tried to find a good > tutorial/reference on the Ruby debugger but haven''t. The closest I found > is the "sample session" in Programming Ruby but that isn''t really a > reference. And RubyGarden says I can type "h" to get help but then I get > a nice stacktrace telling me "h" doesn''t exist. "list" seems to work but > it''s a long and, at least for a person as stupid as me, totally > unparsable line. Also, the tab completion doesn''t seem to work for me > when in breakpointer mode (as it does when using IRB). Is it my setup or > is it normal behaviour?As far as I understand it, the breakpointer is not the same as the ruby debugger. And they don''t play nice together. jean
Arachno Ruby has an IDE that does what you are looking for. I mean, I know *real* men write such incredibly powerful Test Cases that they render interactive debuggers obselete, but for us mortals... -----Original Message----- From: m-lists-XIjiVMmf7g3LoDKTGw+V6w@public.gmane.org Sent: Monday, October 3, 2005 7:31 PM -07:00 To: Brian Hogan [bphogan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org];rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails] WEBrick output in Eclipse/RDT I guess that is one way of doing it. But you aren''t really using the RDT debugger. When using a "GUI debugger" (as I see it) you can often add watches for certain variables, create expressions etc and see them change as you move along the execution. I haven''t been exploring the RDT debugger (since I haven''t gotten it to work) that much so I don''t know if it''s even possible in "normal" Ruby apps to do that. I haven''t really explored the breakpointer either so please enlighten me if it''s possible to do the equivalent with the same ease of use (ie, without a lot of typing commands to step over, into, resume, typing "breakpoint" *in the source* etc) and overview (watching several variables and expressions of interest at once). What I do have noticed is that you need to connect the breakpointer if you have added breakpoints to the code (the server always halts on the breakpoints whether you have the breakpointer connected or not) and that is very annoying (ie you have to remove them when you''re done and then add them again when you go into the next session). Am I missing something very obvious here? I''ve tried to find a good tutorial/reference on the Ruby debugger but haven''t. The closest I found is the "sample session" in Programming Ruby but that isn''t really a reference. And RubyGarden says I can type "h" to get help but then I get a nice stacktrace telling me "h" doesn''t exist. "list" seems to work but it''s a long and, at least for a person as stupid as me, totally unparsable line. Also, the tab completion doesn''t seem to work for me when in breakpointer mode (as it does when using IRB). Is it my setup or is it normal behaviour? /Marcus _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails ________________________________________ Email in a Flash! http://www.goowy.com _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails