Giter Site home page Giter Site logo

hensom / vscode-bazel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bazelbuild/vscode-bazel

0.0 0.0 0.0 356 KB

Bazel support for Visual Studio Code

Home Page: https://marketplace.visualstudio.com/items?itemName=BazelBuild.vscode-bazel

License: Apache License 2.0

TypeScript 98.15% Shell 1.85%

vscode-bazel's Introduction

Bazel plugin for Visual Studio Code

Build Status

This extension provides support for Bazel in Visual Studio.

Features

  • Bazel Build Targets tree displays the build packages/targets in your workspace
  • CodeLens links in BUILD files to directly launch a build or test by simply clicking on the targets
  • Buildifier integration to lint and format your Bazel files (requires that Buildifier be installed)
  • Debug Starlark code in your .bzl files during a build (set breakpoints, step through code, inspect variables, etc.)

Configuring the Extension

This extension adds a Bazel section to the extension settings in Visual Studio Code. If you have Bazel installed in a location that is not on your system path or if you wish to use a different version in the IDE, you should set the Bazel: Executable setting to the location of the Bazel executable.

Similarly, the Bazel: Buildifier Executable setting can be configured if you install Buildifier in a location that is not on your system path.

When Buildifier is installed, the Format Document command in Visual Studio code will reformat BUILD, WORKSPACE, .bzl, and .sky files using the tool and will display lint warnings from those files as you type. By default, this extension does not automatically fix lint warnings during formatting, but you can opt into this by enabling the Bazel: Buildifier Fix on Format setting.

Using the Starlark Debugger

Currently, the Starlark Debugger can be used by right-clicking a build target in the Bazel Build Targets view and selecting "Build Target with Starlark Debugger". This will start the build inside the Visual Studio Code debugger (output will be redirected to the Debug Console pane) and it will pause on any breakpoints hit during execution.

When a Bazel thread is paused, you can step through Starlark code, add watch expressions, and execute arbitrary statements by typing them in the input area of the Debug Console.

Clicking the "Stop" button in the debugger will kill the Bazel process being debugger, allowing you to halt the current build. The Bazel server, however, will continue running.

Contributing

If you would like to contribute to the Bazel Visual Studio extension, please refer to the contribution guidelines for information about our patch acceptance process and setting up your development environment.

vscode-bazel's People

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.