This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 154860 - Need ability to specify debug URL for a RoR Application
Summary: Need ability to specify debug URL for a RoR Application
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@ruby
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-07 10:08 UTC by esmithbss
Modified: 2011-01-28 20:12 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description esmithbss 2008-12-07 10:08:36 UTC
When debugging a RoR application, the application is launched, then the default browser is launched against localhost.

While the application may be running on localhost, it is frequently necessary to debug or test the application using the
fqdn of the computer (e.g.: subdomain.testdomain.com) instead of localhost.

This is particularly important when the database is keyed by subdomains or (for distributed/remarketed applications)
domains.

To accomodate this and allow users to launch the browser using the proper URL, an additional field needs to be added to
the ruby project to store the URL used for launching the application.
Comment 1 Martin Krauskopf 2008-12-08 08:12:33 UTC
I think you can use in 7.0 remote(ly local) debugging:

  http://www.netbeans.org/nonav/issues/show_bug.cgi?id=104473

Described in more detail here:

  http://blogs.sun.com/martink/entry/remote_debugging_debug_whatever_ruby
Comment 2 esmithbss 2008-12-08 08:35:33 UTC
The remote debugging is the back-end part.  So if that's all that exists when 7 comes out, then it can be used.

But the real issue is when a developer launches the project within the IDE, if the browser is automatically launched on
localhost, then anything dealing with a subdomain will (most likely) generate an "Unexpected nil object" exception
immediately and anything requiring a fqdn to properly debug the application won't launch properly into the "expected"
environment.
 

Assume the following scenario (fqdn's required):
1) You create a RoR project with some RESTful web services in it.
2) You set up a number of breakpoints, one at each invocation point.
3) You have a remote web application that calls your RESTful web services and is your debugging starting point.
4) You launch your RoR application (using current localhost restriction) and receive the index page (if it hasn't been
deleted)
*** Now, for the user to debug the application, they need to go to the remote page in their browser (via manually
typing, a bookmark, or some other method outside of the debugger's control)

If however, the user can specify the fqdn for the debugger web application, then #4 above can launch to the correct page
within the browser directly.




Comment 3 Martin Krauskopf 2008-12-08 08:54:55 UTC
Sorry, I should mention that the suggestion is clear workaround, if that works at all. So the problem is just with the
debugging, right?

So in other words if you edit the rdebug-ide executable (in bin directory on your PATH or in GEM_HOME) and add (around
line 118):

  host = 'my.custom.domain' # <---- this is added line
  $stderr.printf "Fast Debugger (ruby-debug-ide 0.4.2) listens on #{host}:#{port}\n"

then it works as you wish? If yes, it should be easy to permit the setting of host from NetBeans UI.

Let me know, thanks. (Sorry for my Rails-word ignorance, I'm living in lower floors ;) ).