• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Good way to test a script

Scheduled Pinned Locked Moved Developers' Forum
8 Posts 6 Posters 552 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    liquid98
    last edited by 9 Apr 2011, 07:58

    Hello,

    I'm stupid I know, but what do you guys do to test a script that you've wrote?
    My method gets me on my nerves by now. It goes like this:

    1 write a ruby script, and save it in the plug-ins folder
    2 open sketchup
    3 take notice of error message
    4 close sketchup
    5 modify script
    6 goto step 2 until script works.

    There must be a more comfortable way to test a ruby script??

    please help

    edit:
    Found a solution myself:

    404 Not Found

    favicon

    (www.johnj.com)

    edit: But it doesn't work for me, can anyone please help?

    Things that flourish fall into decay. This is not-Tao, And what is not-Tao soon ends ~ Lao tse

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 9 Apr 2011, 14:51

      I just reload the script by using the Ruby Console:

      load 'filename.rb'

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • K Offline
        kyyu
        last edited by 11 Apr 2011, 03:04

        I use Jim Foltz's Ruby Toolbar plugin. It will load and reload a plugin file: http://forums.sketchucation.com/viewtopic.php?t=1542

        That plugin in the 1st post looks interesting, but looks like it checks a folder every second, as long as sketchup is running. Do you really want that?

        -Kwok

        1 Reply Last reply Reply Quote 0
        • D Offline
          Dan Rathbun
          last edited by 11 Apr 2011, 03:12

          @liquid98 said:

          edit: But it doesn't work for me, can anyone please help?

          Put your scripts in a subfolder of the Plugins folder, call it "Dev" or "Liquid" or whatever, and that reloader should work better (you really do not want to reload all scripts in the "Plugins" folder.)

          The reloader can be tweeked to reload upon a larger interval (rather than 1 sec.)

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • H Offline
            honoluludesktop
            last edited by 11 Apr 2011, 09:22

            tt's way works OK for me. One less plugin, and when debugging, the ruby console is open anyway. btw, I use web console too.

            1 Reply Last reply Reply Quote 0
            • L Offline
              liquid98
              last edited by 13 Apr 2011, 08:39

              Thanks guys for the input!

              Things that flourish fall into decay. This is not-Tao, And what is not-Tao soon ends ~ Lao tse

              1 Reply Last reply Reply Quote 0
              • P Offline
                Pixero
                last edited by 13 Apr 2011, 10:52

                Here's a topic I started with some good info about debugging scripts:
                http://forums.sketchucation.com/viewtopic.php?f=180&t=34052

                1 Reply Last reply Reply Quote 0
                • L Offline
                  liquid98
                  last edited by 23 Apr 2011, 18:33

                  @pixero said:

                  Here's a topic I started with some good info about debugging scripts:
                  http://forums.sketchucation.com/viewtopic.php?f=180&t=34052

                  That's a really useful thread indeed, thnx 😄

                  Things that flourish fall into decay. This is not-Tao, And what is not-Tao soon ends ~ Lao tse

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Buy SketchPlus
                  Buy SUbD
                  Buy WrapR
                  Buy eBook
                  Buy Modelur
                  Buy Vertex Tools
                  Buy SketchCuisine
                  Buy FormFonts

                  Advertisement