如何让Eclipse Debug Server调试rails应用程序? [英] How do I get Eclipse Debug Server to debug rails application?

查看:144
本文介绍了如何让Eclipse Debug Server调试rails应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用命令行'rails server'启动时,我有一个简单的rails应用程序在Eclipse Juno中运行。
我现在需要在eclipse ide中调试并设置断点,我无法弄清楚如何使用Run Server,Debug Server,Run As或调试为'。没有任何事情发生,没有输出到控制台,没有任何东西。



我的gemlist有:
使用debugger-linecache(1.2.0)/
使用调试器-ruby_core_source(1.3.2)/
使用调试器(1.6.6)



我运行捆绑安装和gem安装调试器成功。
我有Ruby 1.93,Rails 3.2.17
Windows 7.
重新启动。



我在我的MAC上配置了一个eclipse环境,调试器,但我找不到Windows安装程序的缺失的一块。



非常感谢,



Anne

解决方案

我的eclipse + aptana插件有类似的问题。当我选择调试/运行服务器时,没有任何反应。



问题是与项目结构。在我的情况下,我在eclipse中有一个空的rails项目(testProject),并从文件系统(railsApp)导入我的rails应用程序。因此,项目浏览器具有层次结构作为



testProject - > railsApp - > app,config等。



但是,为了使调试工作,我不得不将我的项目层次结构作为railsApp - > app,config等。



新鲜eclipse,作为一个新的项目导入现有的文件夹作为默认视角的rails项目。然后调试工作正常。



干杯!


I have a simple rails app that runs in Eclipse Juno when I use the command line 'rails server' to launch. I now need to debug in the eclipse ide and set breakpoints, and I can't figure out how to run the server withing eclipse using either 'Run Server', 'Debug Server', 'Run As', or 'Debug As'. Nothing happens, no output to the Console, nothing.

My gemlist has: Using debugger-linecache (1.2.0)/ Using debugger-ruby_core_source (1.3.2)/ Using debugger (1.6.6)

I ran bundle install and 'gem install debugger' successfully. I have Ruby 1.93, Rails 3.2.17 Windows 7. Restarted.

I have an eclipse environment configured on my MAC, with the debugger, but I can't find the missing piece for the Windows setup.

Thanks very much,

Anne

解决方案

I had the similar issue with my eclipse + aptana plugin. When I select 'debug/run server', nothing happened.

The issue was with the project structure. In my case, I had an empty rails project (testProject) in eclipse and imported my rails application from file system (railsApp). So, the project explorer, had hierarchy as

testProject -> railsApp -> app, config, etc..

But, In order to make the debugging work, I had to have my project hierarchy as railsApp -> app, config, etc..

Todo that, In a fresh eclipse, import existing folder as a new project with 'rails project' as a default perspective. Then debugging works fine.

Cheers !

这篇关于如何让Eclipse Debug Server调试rails应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆