Coder Social home page Coder Social logo

sketchup-crafty's Introduction

VSCode Project for SketchUp Extension Development

This is a boiler plate example project for setting up a VSCode project for SketchUp extension development.

Key features of this setup:

  • When opening the project in VSCode you will be presented with a recommended set of VSCode extensions if you are missing any.
  • Configured for Ruby auto-complete and code insight.
  • SketchUp Ruby API supported in auto-complete.
  • VSCode tasks for debugging Ruby source in SketchUp.
  • Inline static analysis powered by RuboCop and RuboCop SketchUp.

Prerequisites

Getting started

  1. Clone the project to your machine.
  2. From the command line install the require gem dependencies: bundle install
  3. Start coding!

Configuration

You might want to review the various configuration files to fit your project needs:

.rubocop.yml

Configure what RuboCop should look for when analyzing your project. There are comments inline in the configuration file offering some help with what is pre-configured. For more details refer to the rubocop-sketchup manual.

.solargraph.yml

You might want to update the require_paths to reflect one of your SketchUp installation paths to ensure Solargraph is able to provide full auto-complete for the SketchUp API.

.vscode/tasks.json

Add/remove task launchers for relevant SketchUp versions. Follow the pattern for the existing launchers.

.editorconfig

You might want to adjust this configuration file to suit your own coding style. This file is a generic config file supported by many code editors.

How To

Debug in SketchUp

Note: Make sure you have installed the required debugger dll/dylib to enable debugging in SketchUp.

You also need to make sure you are loading the extension directly from your project's directory.

A visual guide is available in our tutorials repository.

The short version is condensed here:

  1. Set break points in the gutter bar next to the line numbers in the editor.
  2. View > Command Palette (Ctrl+Shift+P)
  3. Start typing task
  4. Pick Tasks: Run Task
  5. Pick Debug in SketchUp 2018
  6. Wait for SketchUp to launch.
  7. Go to the Debug tab in VSCode (Ctrl+Shift+D)
  8. Pick Listen for rdebug-ide in the drop-down.
  9. Click the Start Debugging button.

More details: https://github.com/SketchUp/sketchup-ruby-api-tutorials/wiki/VSCode-Debugger-Setup

Further Reading

For the latest information on setting up rubocop-sketchup integration with VSCode, refer to:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.