This is a boiler plate example project for setting up a VSCode project for SketchUp extension development.
Key features of this setup:
bundle install
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.
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:
View > Command Palette
(Ctrl+Shift+P
)task
Tasks: Run Task
Launch SketchUp in Ruby debug mode
2022
)Ctrl+Shift+D
)Listen for rdebug-ide
in the drop-down.Start Debugging
button.More details: https://github.com/SketchUp/sketchup-ruby-api-tutorials/wiki/VSCode-Debugger-Setup
For the latest information on setting up rubocop-sketchup integration with VSCode, refer to: