A VSCode extension for extra productive WiredTiger development.
- Tasks for running tests, and builds
- A sidebar view for WiredTiger database files
- WT utility tool built into the command palette and sidebar view
- Common snippets available in the intellisense
- Commands for automatically configuring the debugger
- Settings for configuring the build and test tools
Keybindings can be used to quickly access tasks from the extension. The default keybindings
for the extension use a key chord starting with
Cmd+M followed by a key for that task.
Users can also configure their own key bindings in the VSCode Preferences:
You can use the extension to build wiredtiger with the build tasks provided. These tasks
can be access through the
Tasks: Run Task command or through keybindings.
These are the available build tasks:
build-clean: A build task that recreates a build directory.
build-clean-configure: A build task that recreates a build directory and opens ccmake.
build-reconfigure: Open ccmake in the task shell window.
ninja: Runs ninja.
The tasks will have paths to the build tools set by default, however, these can be changed in the settings which can be access by
Cmd+, and searching for Sabertooth.
The extension provides a sidebar view that will list all the database files found in the workspace and group them by their
HOME directory. Each entry in the tree can then be dumped or verify using the dump or verify buttons.
WT Utility Commands
The wt tool is a command-line utility that provides access to various pieces of the WiredTiger functionality.
This extension exposes the utility through VSCode commands that can be accessed through the command palette.
The command palette will prompt the user for configurations through input fields and selection items.
Currently only dump and verify are partially supported, however, future updates will add support for additional commands.
- Open the command palette using
Cmd/Ctrl + Shift + P
- Type WT: to filter the extension commands.
The extension provides common snippets useful for WiredTiger developers.
Similar to the build tasks the python test suite can be run as tasks using the Run Tasks command or using the keybindings mentioned above.
These are the python tasks available:
python-test: Runs specified python test from the settings.
python-test-all: Runs all python tests in the suite.
python-test-current: Run the currently open python test.
python-test-all-open: Runs all the python tests open the tab group.
Test format can also be run as a task. The task will use the format.sh script to run the tests
and can be configured in the "format" section of the extension settings.
test-format: Runs test format with the configurations in the settings.
The extension also provides a command
WT: Print Format Traces for dumping ops tracing from a test format run. The command will provide a drop down menu where you can select which database directory produced by test format to dump. Ops tracing can be enabled and configured in the settings.
You can use the
WT: Create Launch JSON command to create a default launch configuration file useful
for debugging most WiredTiger tests. These will include specific test names as examples which can be changed.
Once the launch configuration file is created, you can use the
WT: Find Core Files to
automatically create launch configurations for any core dumps found in the workspace. The debugger
can then immediately launch any core dumps listed. If you're debugging from evergreen artifacts, use
WT: Find Cores in Artifacts command instead as there are different configuration requirements
for those core dumps.
You can change the settings for many of the tasks and commands listed above. The settings will use
the mongodbtoolchain for many of the tasks and commands by default. However, these can be changed to use different binaries for python, cmake and other tools.
A willing heart and the WiredTiger Github repo. :D
- Hover information is currently not in production. Full scale hover information is a future plan.
- The screenshots in the readme don't display in the marketplace.
- Install Node.js
- Clone the Sabertooth repo.
- Run npm install inside the Sabertooth repository to install the node package dependencies.
- Open Sabertooth in VSCode.
- Make your changes.
- Run the debugger with
F5 or using the Run and Debug sidebar.
- Open a wiredtiger as a workspace in the debugger window.
- Test your changes.