Page 1 of 1

search tools

Posted: Mon Apr 29, 2013 7:04 pm
by fixstuff555
Hi all,

Has anyone come up with a way to search inside Ruby blocks to aid in debugging and such?

Would it be possible to read in the ruby code from a primitive and parse it for searching, debugging, etc?

Re: search tools

Posted: Mon Apr 29, 2013 11:56 pm
by trogluddite
fixstuff555 wrote:Has anyone come up with a way to search inside Ruby blocks to aid in debugging and such?

Well, sort of - I do most of my code editing using an external code editor - Notepad++ (freeware - and there are others too(.
The kind of features that a proper code editor has are not something we'll ever see inside FS, I don't think - they are full applications in their own right - but I've been using one for years, and couldn't live without it now (for assembly too). Kind of like a proper word processor, but designed with coding in mind - syntax colouring, showing you where brackets and "def,,,end"s line up, line numbers, multiple views of the same code, search/replace etc. etc.
They won't actually run your code though - so still some cutting and pasting to put it into FS for testing - but, all the same, a big time saver, and much easier on the eye too!

To ease de-bugging, you might want to check out the little trick in THIS POST - when you combine it with the line numbering in an external editor, it is much more useful than the regular error messages.

Re: search tools

Posted: Tue Apr 30, 2013 8:16 pm
by fixstuff555
Wouldn't that be a really cool feature though? A little checkbox in the lower corner similar to "ON" for ruby code, except one for editing like "EDIT". With it on, everything is color coded just like in Notepad++, search tools, etc. Maybe a bar at the top of the Ruby Primitive with the basics similar to Notepad++. Just turn it off when done and there you go. Live code. :mrgreen:

Re: search tools

Posted: Tue Apr 30, 2013 9:56 pm
by trogluddite
Indeed! That would be lovely - the system you suggest would be a great, because the switch would allow us to keep the "process as you type" way of working which we have now. That's the flip side of the coin - the one killer feature that an external editor will never have is to run for every single value change while editing. That is so useful when you want to find the 'sweet spot' for a variable value that needs setting empirically, or are just messing around with a method to find out how it works - that's a huge advantage of 'in-line' editors like the FS ones.