SapphireSteel Forum
Welcome,
Guest
. Please
login
or
register
.
May 22, 2013, 02:06:55 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Welcome to the SapphireSteel forum - for discussion of the Ruby In Steel and Amethyst IDEs
3884
Posts in
800
Topics by
669
Members
Latest Member:
m
SapphireSteel Forum
General
Ruby In Steel
Rails feature request - Open IE when you run 'one click debugger'
« previous
next »
Pages:
[
1
]
Author
Topic: Rails feature request - Open IE when you run 'one click debugger' (Read 5046 times)
apreece
Registered User
Newbie
Posts: 18
Rails feature request - Open IE when you run 'one click debugger'
«
on:
April 30, 2007, 11:46:42 AM »
It would be nice if when you did a one click debugger session, an IE window opened up (bonus points for the embedded IE in VS.net) that headed to
http://localhost:3000
(or where ever the debugger was running)
Possible? Useful? Idiotic?
Logged
Huw Collingbourne
Administrator
Hero Member
Posts: 934
Re: Rails feature request - Open IE when you run 'one click debugger'
«
Reply #1 on:
April 30, 2007, 11:58:30 AM »
This could be done. In fact, you could even do it with a keyboard macro. The only downside of this is that, by making it a default, it could be an irritation to people who want to test in a standalone browser (IE, Firefox, Opera etc.). We're open to persuasion on this but I must say that, as a general rule, I am cautious about adding new behaviour which may not be what all users want. The keyboard shortcut (CTRL+W, W) fires up the integrated browser pretty quickly anyway. However, I can see the logic of what you're asking for (if you're debugging Rails, you need a browser, so why not make it appear automatically?) but I'm still in two minds about that. I'll need to sleep on the idea first...
best wishes
Huw
Logged
apreece
Registered User
Newbie
Posts: 18
Re: Rails feature request - Open IE when you run 'one click debugger'
«
Reply #2 on:
April 30, 2007, 01:08:21 PM »
It would be literally, "one click" debugging though
is this something that's easy to set as a user option?
something like:
On Debugger start:
1) launch in embedded browser
2) lauch via external command line (text box for command) (this would allow opera, FF, lynx...)
3) do not launch a browser
and then, default to option 3?
I'll try to start using ctrl WW now, and see how that works out.
Thanks!
Logged
Huw Collingbourne
Administrator
Hero Member
Posts: 934
Re: Rails feature request - Open IE when you run 'one click debugger'
«
Reply #3 on:
April 30, 2007, 02:06:17 PM »
Don't mention the word 'option' to Dermot!
Seriously, though, there is a big risk in putting in too many options. Internally we've tried adding a number of options only to take them out later due to the fact that they cause more confusion than clarity:
If option A, and option B then X unless option C in which case Y...
(the logic of multiple options can quickly become quite complicated). I'm still thinking over the idea of auto-browser launching. But I'm reluctant to add anything new until I'm sure it's correct. Once we've added it we are committed to it; and it's much easier to add features than to remove them. Anyway, first try out Ctrl+W, W and see if that's a fast enough alternative. Incidentally, the One-Click Debugger willl have a no-click option in the next release. Honestly. You'll see what I mean when we release 1.1.
Logged
apreece
Registered User
Newbie
Posts: 18
Re: Rails feature request - Open IE when you run 'one click debugger'
«
Reply #4 on:
April 30, 2007, 03:46:21 PM »
:O I'll have to run back and obfuscate my posts!
That's a good point. Too many options can lead to horrible spaghetti code. And I do agree that you've got a very valid point, in terms of alternate browsers. If it's not something that you can disable, it's probably not a good idea to randomly launch browser windows. ALTHOUGH, it would be duplicating the F5 functionality in ASP.NET projects, keeping the UI consistant.
I'll tough it out for now, until I see your super neat new features in 1.1.
Does the one click support build scripts? Could I just add a .bat launcher on build completion?
Thanks for the info!
Logged
Dermot
Administrator
Hero Member
Posts: 1005
Re: Rails feature request - Open IE when you run 'one click debugger'
«
Reply #5 on:
April 30, 2007, 04:15:10 PM »
yes - there is a configurable file. If you look under Tools|Options|Projects|Ruby In Steel, you'll see a 'Rails debug script' box. This specifies the Ruby file that kicks off Rails. You can put your own Ruby file in there which can just chain to the existing file. There are several options currently - the all look like xxx_service.rb.
If you want to execute Windows commands you can use Ruby commands to shell out to a command window - backquote does it, I think - and then chain to the Rails bootstrap.
Currently, this setting is persisted across all projects. It would make more sense to make it a per project setting - we're thinking about that.
The reason I don't like too many options is that they are very difficult to test. I vividly remember having (as a junior programmer) to try and debug and test an application that had lots and lots of code like 'if it's Wednesday and the location is Moscow and the wind is coming from the west ... '. An absolute
nightmare
! Basically, the sales part of the organization had sold the application to the customer based on the fact that that he (the customer) could have anything he wanted. The result was that the app soon got a reputation of being unreliable. Each customer added a new layer of options: the rest - and the company that produced the app - is history ...
Dermot
Logged
jakenuts
Newbie
Posts: 2
Re: Rails feature request - Open IE when you run 'one click debugger'
«
Reply #6 on:
September 06, 2008, 06:35:06 AM »
I registered just so I could add my 2c to this topic, here goes:
The nice thing about extensions to the VS IDE (or any IDE) is that they all share common functions (color formatting, intellisense, source control) and behaviors that make getting up to speed with a different language easier. From a user's perspective, running Rails in VS2008 shouldn't be terribly different than ASP.NET or PHP (VS.PHP) and launching a browser on debug is one of those common behaviors. You don't need to add an option or even logic to determine which browser the user wants, you can just add a "Run at Debug" command line to the project file and allow the user to enter a browser with a URL, another executable, or nothing. That way you allow users to have the same experience whether they are running ASP.NET or Rails without getting overly complicated in the implementation. A complete solution would be to offer the options ASP.NET has (default browser with URL, an executable with a command line, or nothing) but just adding the "Run at Debug" command line would come very close without expending alot of time or energy. I understand that in many cases closing the executable after debugging could be problematic, so just leave the browser up if you need to, I'd rather just close an old window that have to load a browser and point it to a particular URL every time I debug. This small extension would allow for that, or allow for keeping the current behavior depending on the users needs (as opposed to the developers needs which are usually focused on simplification and ease of maintenance).
Again, just my 2c but I think they are probably shared by many familiar with the IDE.
Thanks!
James
Logged
Dermot
Administrator
Hero Member
Posts: 1005
Re: Rails feature request - Open IE when you run 'one click debugger'
«
Reply #7 on:
September 07, 2008, 03:30:39 PM »
Good idea.
We'll put it in the 1.4 release.
Dermot
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> News and Announcements
=> Amethyst
=> Ruby In Steel
=> Ruby Programming
=> The Snug Bar