Skip to main content

Using the advanced functionality of the CodeQL for VS Code extension

The CodeQL extension for Visual Studio Code adds rich language support for CodeQL and supports writing queries to find problems in codebases.

Who can use this feature?

CodeQL is available for the following repository types:

Using the CodeQL model editor

You can view, write, and edit CodeQL model packs in Visual Studio Code.

Creating a custom query

You can work from a template to write your own code to create a custom query to analyze a specific language.

Managing CodeQL query packs and library packs

You can view, write, and edit CodeQL query and library packs in Visual Studio Code using the CodeQL extension.

Exploring the structure of your source code

You can use the AST viewer to display the abstract syntax tree of a CodeQL database.

Testing CodeQL queries in Visual Studio Code

You can run unit tests for CodeQL queries using the Visual Studio Code extension.

Customizing settings

You can edit the settings for the CodeQL for Visual Studio Code extension to suit your needs.

Setting up a CodeQL workspace

When you're working with CodeQL, you need access to the standard libraries and queries.

Configuring access to the CodeQL CLI

The CodeQL for Visual Studio Code extension uses the CodeQL CLI to compile and run queries.

Telemetry in CodeQL for Visual Studio Code

If you specifically opt in to permit GitHub to do so, GitHub will collect usage data and metrics for the purposes of helping the core developers to improve the CodeQL extension for VS Code.