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.
    • liquid98L Offline
      liquid98
      last edited by

      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
      • thomthomT Offline
        thomthom
        last edited by

        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

          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
          • Dan RathbunD Offline
            Dan Rathbun
            last edited by

            @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
            • honoluludesktopH Offline
              honoluludesktop
              last edited by

              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
              • liquid98L Offline
                liquid98
                last edited by

                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
                • PixeroP Offline
                  Pixero
                  last edited by

                  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
                  • liquid98L Offline
                    liquid98
                    last edited by

                    @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