[Plugin] Debug tool: run lastloaded ruby
-
Hi!
This plugin simplifies the debugging process with a few mouse clicks. It works in conjunction with Jim Foltz' rubytoolbar, which can be found here:
http://sketchuptips.blogspot.com/2007/08/plugin-ruby-toolbar.html
Once you've loaded the script you want to debug through the rubytoolbar, you can simply reload and execute your script in one step.
How does it work?
Lastloaded.rb looks for a line in your code tagged with:
#loadmeSo just put this string after the line in your code that Sketchup has to execute.
For example:<span class="syntaxdefault">new_menu </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> UI</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">menu</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"Plugins"</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">cmd </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> UI</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">Command</span><span class="syntaxkeyword">.new(</span><span class="syntaxstring">"text"</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">{</span><span class="syntaxdefault">some command</span><span class="syntaxkeyword">}</span><span class="syntaxdefault"> </span><span class="syntaxcomment">#loadme<br /></span><span class="syntaxdefault">new_menu</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">add_item</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">cmd</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> </span>Lastloaded will now reload your script and automatically runs 'some command' for you. The script has a menu item in the Tools section, so you can assign a shortcut if convenient.
Have fun! I'm open for questions / suggestions
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement