【发布时间】:2019-10-13 18:49:12
【问题描述】:
我在 Mac OS X 上使用 Aptana Studio 3。我试图在调试模式下运行我的服务器,以便我可以设置断点并单步执行我的代码。我创建了以下调试配置
使用“服务器”参数...
但是,当我以调试模式启动服务器时(通过右键单击我的项目,选择 Debug As -> Debug Configurations 并在选择上述配置后单击结果对话框中的“Debug”按钮),服务器启动,但是当我调用代码(使用 curl 命令)来调用该方法时,curl 方法挂起,似乎在断点处......
在 Aptana Studio 控制台中,我看到“输入的创建”输出,但没有看到“完成构建”行。但是 Aptana IDE 并没有像我期望的那样突出显示我设置断点的行。下面是 Aptana 控制台。我还需要做什么才能在调试模式下与 IDE 正确交互?
Fast Debugger (ruby-debug-ide 0.7.0, debase 0.2.4.1, file filtering is supported) listens on 127.0.0.1:50900
=> Booting Puma
=> Rails 5.2.2.1 application starting in development
=> Run `rails server -h` for more startup options
[79989] Puma starting in cluster mode...
[79989] * Version 3.11.4 (ruby 2.5.1-p57), codename: Love Song
[79989] * Min threads: 5, max threads: 5
[79989] * Environment: development
[79989] * Process workers: 2
[79989] * Phased restart available
[79989] * Listening on tcp://0.0.0.0:3000
[79989] Use Ctrl-C to stop
[79989] - Worker 0 (pid: 80014) booted, phase: 0
[79989] - Worker 1 (pid: 80015) booted, phase: 0
Started POST "/users" for 127.0.0.1 at 2019-10-13 13:44:17 -0500
[1m[35m (5.5ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
Processing by UserController#create as JSON
Parameters: {"first_name"=>"Dave", "last_name"=>"Smith", "email"=>"test@example.com"}
entered create
【问题讨论】:
-
您采用的方法是正确的,据我所知设置调试配置的步骤也是正确的,但是您可以将调试 gem 更新为 ruby-debug-base19 (0.11.25) ruby-debug-ide19 (0.4.12) ruby-debug19 (0.11.6) 并验证一次,在此之前使用 rails s --debugger 尝试一次。
-
一个小问题,您是否尝试编写一个简单/普通的 ruby 文件然后右键单击它并选择 Debug As > Ruby application ,IDE 是否打开调试透视图?
标签: debugging configuration ruby-on-rails-5 aptana aptana3