Practise VS Code extension API vocabulary: contribution points, activation events, commands, providers, and webviews.
0 / 45 completed
1 / 45
A VS Code extension ___ point declares the extension's capabilities in package.json — for example, contributes.commands, contributes.languages, or contributes.themes.
Contribution points in package.json declare what the extension provides — without writing TypeScript. contributes.commands registers commands in the Command Palette; contributes.languages declares file type associations; contributes.grammars adds syntax highlighting.
2 / 45
VS Code ___ events define when an extension is loaded — for example, onLanguage:typescript or onCommand:myExtension.hello.
Activation events delay extension loading until needed: onLanguage:python only activates the extension when a Python file is opened. This improves VS Code startup time by avoiding loading all extensions upfront.
3 / 45
An extension ___ registers a handler for a specific command that can be invoked from the Command Palette or keybinding.
vscode.commands.registerCommand associates a command ID with a callback function. When the user invokes the command (via Command Palette or keybinding), VS Code calls the registered callback. Registered commands must be declared in contributes.commands to appear in the palette.
4 / 45
A ___ Provider in VS Code supplies data for a specific feature — for example, a CompletionItemProvider supplies autocomplete suggestions.
VS Code's provider model uses Language Providers: CompletionItemProvider (autocomplete), HoverProvider (documentation on hover), CodeActionProvider (lightbulb), DocumentFormattingEditProvider (formatting). Extensions register providers for specific language IDs.
5 / 45
A VS Code ___ is an embedded web view inside a VS Code panel, allowing extensions to render arbitrary HTML/CSS/JavaScript UI.
Webviews are sandboxed web content panels inside VS Code, used for rich UIs like preview panels, documentation renderers, and settings UIs. They communicate with the extension host via postMessage for bidirectional data exchange.
6 / 45
Sarah: "Hey team, I'm trying to add a new language support feature to the VS Code extension using the `contributes.languages` section in our package.json. But I keep getting this error saying my definition isn't being recognized. Any ideas?"
Which of the following best describes what Sarah is likely referring to when she mentions 'defining a language support feature'?
Sarah is referring to defining how VS Code should interpret and handle files of a specific type. The contributes.languages section within the package.json allows extensions to tell VS Code *how* to process those file types – for example, which syntax highlighting rules to apply or what code completion suggestions to offer. It's crucial to understand this distinction; simply 'detecting languages' isn't sufficient—you need to explicitly define the language support for each file type your extension handles.
7 / 45
David: "I'm reviewing this pull request and noticed the extension is registering a new command, myExtension.formatCode, but it doesn't seem to be properly defined in the package.json. Specifically, I see an entry for contributes.commands, which is great, but it lacks a fully specified command object with a name and execute property. What's David most likely concerned about regarding this command registration?"
David is focusing on the critical missing elements required for the VS Code extension to correctly register and make the `myExtension.formatCode` command accessible. The contributes.commands section *must* include a fully formed command object specifying the command's name (name) and the function or script that should be executed when it's triggered (execute). Without these, VS Code won't recognize the command and therefore won't make it available through the Command Palette or keybindings. He is highlighting a fundamental requirement for proper extension functionality.
8 / 45
Mark is working on a VS Code extension that provides code completion for Python. He's using a contributes.languages entry to register his language support. During a code review, Lisa comments: 'I noticed you're using the `languageSettings` property within your language definition. Are you sure you've correctly specified the `editor.codeActionsOnSave` setting to include things like formatting and linting?' What is Lisa most likely referring to when she mentions 'language settings'?
Lisa is pointing out a crucial aspect of defining language support: the `languageSettings` property within the contributes.languages entry. This setting controls which VS Code features are enabled and configured for that specific language – in this case, things like formatting on save or linting. Developers often overlook these settings, assuming that basic registration is enough; they're vital for tailoring the extension's behavior to the user's needs and ensuring a smooth development experience.
9 / 45
During a Slack discussion about improving the VS Code extension's performance, Ben says: "I'm thinking of using the `contributes.extensionActions` to trigger some background tasks when the user opens a file. It seems like a way to avoid blocking the UI.". Considering Ben's statement and common practices, which of the following best describes what he intends to achieve with `contributes.extensionActions'?
Ben is correctly utilizing `contributes.extensionActions` for asynchronous tasks. This API allows extensions to perform operations like data retrieval or processing without blocking the main VS Code UI thread – a crucial element of responsive application design. The other options describe functionalities handled by different parts of the VS Code extension API, such as commands (contributes.commands), language providers (contributes.languages), and language settings.
10 / 45
During a standup meeting, Alex is explaining his progress on a new VS Code extension for JavaScript. He says, 'I've implemented the `contributes.languages` section to add support for TypeScript. I'm using an editor.definitionProvider to provide accurate Go-to-Definition suggestions when users type in code. However, it seems like my extension isn't showing up in the command palette—the user can't find it by typing 'TypeScript'. What is Alex most likely encountering with regards to the `editor.definitionProvider`?
Alex is likely struggling with how VS Code discovers and indexes language features defined using editor.definitionProvider within the contributes.languages section. The contributes.languages entry itself is correct; however, VS Code needs to be configured correctly to recognize this provider as a command or keybinding. This typically involves ensuring that the extension is properly registered and that VS Code's indexing mechanism is functioning correctly—the incorrect option suggests problems with documentation or architecture rather than configuration.
11 / 45
Sarah: "Hey team, I'm trying to add a new language support feature to the VS Code extension using the `contributes.languages` section in our package.json. But I keep getting this error saying my definition isn't being recognized. Any ideas?"
Which of the following best describes what Sarah is likely referring to when she mentions 'defining a language support feature'?
Sarah is referring to defining how VS Code should interpret and handle files of a specific type. The contributes.languages section within the package.json allows extensions to tell VS Code *how* to process those file types – for example, which syntax highlighting rules to apply or what code completion suggestions to offer. It's crucial to understand this distinction; simply 'detecting languages' isn't sufficient—you need to explicitly define the language support for each file type your extension handles.
12 / 45
David: "I'm reviewing this pull request and noticed the extension is registering a new command, myExtension.formatCode, but it doesn't seem to be properly defined in the package.json. Specifically, I see an entry for contributes.commands, which is great, but it lacks a fully specified command object with a name and execute property. What's David most likely concerned about regarding this command registration?"
David is focusing on the critical missing elements required for the VS Code extension to correctly register and make the `myExtension.formatCode` command accessible. The contributes.commands section *must* include a fully formed command object specifying the command's name (name) and the function or script that should be executed when it's triggered (execute). Without these, VS Code won't recognize the command and therefore won't make it available through the Command Palette or keybindings. He is highlighting a fundamental requirement for proper extension functionality.
13 / 45
Mark is working on a VS Code extension that provides code completion for Python. He's using a contributes.languages entry to register his language support. During a code review, Lisa comments: 'I noticed you're using the `languageSettings` property within your language definition. Are you sure you've correctly specified the `editor.codeActionsOnSave` setting to include things like formatting and linting?' What is Lisa most likely referring to when she mentions 'language settings'?
Lisa is pointing out a crucial aspect of defining language support: the `languageSettings` property within the contributes.languages entry. This setting controls which VS Code features are enabled and configured for that specific language – in this case, things like formatting on save or linting. Developers often overlook these settings, assuming that basic registration is enough; they're vital for tailoring the extension's behavior to the user's needs and ensuring a smooth development experience.
14 / 45
During a Slack discussion about improving the VS Code extension's performance, Ben says: "I'm thinking of using the `contributes.extensionActions` to trigger some background tasks when the user opens a file. It seems like a way to avoid blocking the UI.". Considering Ben's statement and common practices, which of the following best describes what he intends to achieve with `contributes.extensionActions'?
Ben is correctly utilizing `contributes.extensionActions` for asynchronous tasks. This API allows extensions to perform operations like data retrieval or processing without blocking the main VS Code UI thread – a crucial element of responsive application design. The other options describe functionalities handled by different parts of the VS Code extension API, such as commands (contributes.commands), language providers (contributes.languages), and language settings.
15 / 45
During a standup meeting, Alex is explaining his progress on a new VS Code extension for JavaScript. He says, 'I've implemented the `contributes.languages` section to add support for TypeScript. I'm using an editor.definitionProvider to provide accurate Go-to-Definition suggestions when users type in code. However, it seems like my extension isn't showing up in the command palette—the user can't find it by typing 'TypeScript'. What is Alex most likely encountering with regards to the `editor.definitionProvider`?
Alex is likely struggling with how VS Code discovers and indexes language features defined using editor.definitionProvider within the contributes.languages section. The contributes.languages entry itself is correct; however, VS Code needs to be configured correctly to recognize this provider as a command or keybinding. This typically involves ensuring that the extension is properly registered and that VS Code's indexing mechanism is functioning correctly—the incorrect option suggests problems with documentation or architecture rather than configuration.
16 / 45
Sarah: "Hey team, I'm trying to add a new language support feature to the VS Code extension using the `contributes.languages` section in our package.json. But I keep getting this error saying my definition isn't being recognized. Any ideas?"
Which of the following best describes what Sarah is likely referring to when she mentions 'defining a language support feature'?
Sarah is referring to defining how VS Code should interpret and handle files of a specific type. The contributes.languages section within the package.json allows extensions to tell VS Code *how* to process those file types – for example, which syntax highlighting rules to apply or what code completion suggestions to offer. It's crucial to understand this distinction; simply 'detecting languages' isn't sufficient—you need to explicitly define the language support for each file type your extension handles.
17 / 45
David: "I'm reviewing this pull request and noticed the extension is registering a new command, myExtension.formatCode, but it doesn't seem to be properly defined in the package.json. Specifically, I see an entry for contributes.commands, which is great, but it lacks a fully specified command object with a name and execute property. What's David most likely concerned about regarding this command registration?"
David is focusing on the critical missing elements required for the VS Code extension to correctly register and make the `myExtension.formatCode` command accessible. The contributes.commands section *must* include a fully formed command object specifying the command's name (name) and the function or script that should be executed when it's triggered (execute). Without these, VS Code won't recognize the command and therefore won't make it available through the Command Palette or keybindings. He is highlighting a fundamental requirement for proper extension functionality.
18 / 45
Mark is working on a VS Code extension that provides code completion for Python. He's using a contributes.languages entry to register his language support. During a code review, Lisa comments: 'I noticed you're using the `languageSettings` property within your language definition. Are you sure you've correctly specified the `editor.codeActionsOnSave` setting to include things like formatting and linting?' What is Lisa most likely referring to when she mentions 'language settings'?
Lisa is pointing out a crucial aspect of defining language support: the `languageSettings` property within the contributes.languages entry. This setting controls which VS Code features are enabled and configured for that specific language – in this case, things like formatting on save or linting. Developers often overlook these settings, assuming that basic registration is enough; they're vital for tailoring the extension's behavior to the user's needs and ensuring a smooth development experience.
19 / 45
During a Slack discussion about improving the VS Code extension's performance, Ben says: "I'm thinking of using the `contributes.extensionActions` to trigger some background tasks when the user opens a file. It seems like a way to avoid blocking the UI.". Considering Ben's statement and common practices, which of the following best describes what he intends to achieve with `contributes.extensionActions'?
Ben is correctly utilizing `contributes.extensionActions` for asynchronous tasks. This API allows extensions to perform operations like data retrieval or processing without blocking the main VS Code UI thread – a crucial element of responsive application design. The other options describe functionalities handled by different parts of the VS Code extension API, such as commands (contributes.commands), language providers (contributes.languages), and language settings.
20 / 45
During a standup meeting, Alex is explaining his progress on a new VS Code extension for JavaScript. He says, 'I've implemented the `contributes.languages` section to add support for TypeScript. I'm using an editor.definitionProvider to provide accurate Go-to-Definition suggestions when users type in code. However, it seems like my extension isn't showing up in the command palette—the user can't find it by typing 'TypeScript'. What is Alex most likely encountering with regards to the `editor.definitionProvider`?
Alex is likely struggling with how VS Code discovers and indexes language features defined using editor.definitionProvider within the contributes.languages section. The contributes.languages entry itself is correct; however, VS Code needs to be configured correctly to recognize this provider as a command or keybinding. This typically involves ensuring that the extension is properly registered and that VS Code's indexing mechanism is functioning correctly—the incorrect option suggests problems with documentation or architecture rather than configuration.
21 / 45
Sarah: "Hey team, I'm trying to add a new language support feature to the VS Code extension using the `contributes.languages` section in our package.json. But I keep getting this error saying my definition isn't being recognized. Any ideas?"
Which of the following best describes what Sarah is likely referring to when she mentions 'defining a language support feature'?
Sarah is referring to defining how VS Code should interpret and handle files of a specific type. The contributes.languages section within the package.json allows extensions to tell VS Code *how* to process those file types – for example, which syntax highlighting rules to apply or what code completion suggestions to offer. It's crucial to understand this distinction; simply 'detecting languages' isn't sufficient—you need to explicitly define the language support for each file type your extension handles.
22 / 45
David: "I'm reviewing this pull request and noticed the extension is registering a new command, myExtension.formatCode, but it doesn't seem to be properly defined in the package.json. Specifically, I see an entry for contributes.commands, which is great, but it lacks a fully specified command object with a name and execute property. What's David most likely concerned about regarding this command registration?"
David is focusing on the critical missing elements required for the VS Code extension to correctly register and make the `myExtension.formatCode` command accessible. The contributes.commands section *must* include a fully formed command object specifying the command's name (name) and the function or script that should be executed when it's triggered (execute). Without these, VS Code won't recognize the command and therefore won't make it available through the Command Palette or keybindings. He is highlighting a fundamental requirement for proper extension functionality.
23 / 45
Mark is working on a VS Code extension that provides code completion for Python. He's using a contributes.languages entry to register his language support. During a code review, Lisa comments: 'I noticed you're using the `languageSettings` property within your language definition. Are you sure you've correctly specified the `editor.codeActionsOnSave` setting to include things like formatting and linting?' What is Lisa most likely referring to when she mentions 'language settings'?
Lisa is pointing out a crucial aspect of defining language support: the `languageSettings` property within the contributes.languages entry. This setting controls which VS Code features are enabled and configured for that specific language – in this case, things like formatting on save or linting. Developers often overlook these settings, assuming that basic registration is enough; they're vital for tailoring the extension's behavior to the user's needs and ensuring a smooth development experience.
24 / 45
During a Slack discussion about improving the VS Code extension's performance, Ben says: "I'm thinking of using the `contributes.extensionActions` to trigger some background tasks when the user opens a file. It seems like a way to avoid blocking the UI.". Considering Ben's statement and common practices, which of the following best describes what he intends to achieve with `contributes.extensionActions'?
Ben is correctly utilizing `contributes.extensionActions` for asynchronous tasks. This API allows extensions to perform operations like data retrieval or processing without blocking the main VS Code UI thread – a crucial element of responsive application design. The other options describe functionalities handled by different parts of the VS Code extension API, such as commands (contributes.commands), language providers (contributes.languages), and language settings.
25 / 45
During a standup meeting, Alex is explaining his progress on a new VS Code extension for JavaScript. He says, 'I've implemented the `contributes.languages` section to add support for TypeScript. I'm using an editor.definitionProvider to provide accurate Go-to-Definition suggestions when users type in code. However, it seems like my extension isn't showing up in the command palette—the user can't find it by typing 'TypeScript'. What is Alex most likely encountering with regards to the `editor.definitionProvider`?
Alex is likely struggling with how VS Code discovers and indexes language features defined using editor.definitionProvider within the contributes.languages section. The contributes.languages entry itself is correct; however, VS Code needs to be configured correctly to recognize this provider as a command or keybinding. This typically involves ensuring that the extension is properly registered and that VS Code's indexing mechanism is functioning correctly—the incorrect option suggests problems with documentation or architecture rather than configuration.
26 / 45
Sarah: "Hey team, I'm trying to add a new language support feature to the VS Code extension using the `contributes.languages` section in our package.json. But I keep getting this error saying my definition isn't being recognized. Any ideas?"
Which of the following best describes what Sarah is likely referring to when she mentions 'defining a language support feature'?
Sarah is referring to defining how VS Code should interpret and handle files of a specific type. The contributes.languages section within the package.json allows extensions to tell VS Code *how* to process those file types – for example, which syntax highlighting rules to apply or what code completion suggestions to offer. It's crucial to understand this distinction; simply 'detecting languages' isn't sufficient—you need to explicitly define the language support for each file type your extension handles.
27 / 45
David: "I'm reviewing this pull request and noticed the extension is registering a new command, myExtension.formatCode, but it doesn't seem to be properly defined in the package.json. Specifically, I see an entry for contributes.commands, which is great, but it lacks a fully specified command object with a name and execute property. What's David most likely concerned about regarding this command registration?"
David is focusing on the critical missing elements required for the VS Code extension to correctly register and make the `myExtension.formatCode` command accessible. The contributes.commands section *must* include a fully formed command object specifying the command's name (name) and the function or script that should be executed when it's triggered (execute). Without these, VS Code won't recognize the command and therefore won't make it available through the Command Palette or keybindings. He is highlighting a fundamental requirement for proper extension functionality.
28 / 45
Mark is working on a VS Code extension that provides code completion for Python. He's using a contributes.languages entry to register his language support. During a code review, Lisa comments: 'I noticed you're using the `languageSettings` property within your language definition. Are you sure you've correctly specified the `editor.codeActionsOnSave` setting to include things like formatting and linting?' What is Lisa most likely referring to when she mentions 'language settings'?
Lisa is pointing out a crucial aspect of defining language support: the `languageSettings` property within the contributes.languages entry. This setting controls which VS Code features are enabled and configured for that specific language – in this case, things like formatting on save or linting. Developers often overlook these settings, assuming that basic registration is enough; they're vital for tailoring the extension's behavior to the user's needs and ensuring a smooth development experience.
29 / 45
During a Slack discussion about improving the VS Code extension's performance, Ben says: "I'm thinking of using the `contributes.extensionActions` to trigger some background tasks when the user opens a file. It seems like a way to avoid blocking the UI.". Considering Ben's statement and common practices, which of the following best describes what he intends to achieve with `contributes.extensionActions'?
Ben is correctly utilizing `contributes.extensionActions` for asynchronous tasks. This API allows extensions to perform operations like data retrieval or processing without blocking the main VS Code UI thread – a crucial element of responsive application design. The other options describe functionalities handled by different parts of the VS Code extension API, such as commands (contributes.commands), language providers (contributes.languages), and language settings.
30 / 45
During a standup meeting, Alex is explaining his progress on a new VS Code extension for JavaScript. He says, 'I've implemented the `contributes.languages` section to add support for TypeScript. I'm using an editor.definitionProvider to provide accurate Go-to-Definition suggestions when users type in code. However, it seems like my extension isn't showing up in the command palette—the user can't find it by typing 'TypeScript'. What is Alex most likely encountering with regards to the `editor.definitionProvider`?
Alex is likely struggling with how VS Code discovers and indexes language features defined using editor.definitionProvider within the contributes.languages section. The contributes.languages entry itself is correct; however, VS Code needs to be configured correctly to recognize this provider as a command or keybinding. This typically involves ensuring that the extension is properly registered and that VS Code's indexing mechanism is functioning correctly—the incorrect option suggests problems with documentation or architecture rather than configuration.
31 / 45
Sarah: "Hey team, I'm trying to add a new language support feature to the VS Code extension using the `contributes.languages` section in our package.json. But I keep getting this error saying my definition isn't being recognized. Any ideas?"
Which of the following best describes what Sarah is likely referring to when she mentions 'defining a language support feature'?
Sarah is referring to defining how VS Code should interpret and handle files of a specific type. The contributes.languages section within the package.json allows extensions to tell VS Code *how* to process those file types – for example, which syntax highlighting rules to apply or what code completion suggestions to offer. It's crucial to understand this distinction; simply 'detecting languages' isn't sufficient—you need to explicitly define the language support for each file type your extension handles.
32 / 45
David: "I'm reviewing this pull request and noticed the extension is registering a new command, myExtension.formatCode, but it doesn't seem to be properly defined in the package.json. Specifically, I see an entry for contributes.commands, which is great, but it lacks a fully specified command object with a name and execute property. What's David most likely concerned about regarding this command registration?"
David is focusing on the critical missing elements required for the VS Code extension to correctly register and make the `myExtension.formatCode` command accessible. The contributes.commands section *must* include a fully formed command object specifying the command's name (name) and the function or script that should be executed when it's triggered (execute). Without these, VS Code won't recognize the command and therefore won't make it available through the Command Palette or keybindings. He is highlighting a fundamental requirement for proper extension functionality.
33 / 45
Mark is working on a VS Code extension that provides code completion for Python. He's using a contributes.languages entry to register his language support. During a code review, Lisa comments: 'I noticed you're using the `languageSettings` property within your language definition. Are you sure you've correctly specified the `editor.codeActionsOnSave` setting to include things like formatting and linting?' What is Lisa most likely referring to when she mentions 'language settings'?
Lisa is pointing out a crucial aspect of defining language support: the `languageSettings` property within the contributes.languages entry. This setting controls which VS Code features are enabled and configured for that specific language – in this case, things like formatting on save or linting. Developers often overlook these settings, assuming that basic registration is enough; they're vital for tailoring the extension's behavior to the user's needs and ensuring a smooth development experience.
34 / 45
During a Slack discussion about improving the VS Code extension's performance, Ben says: "I'm thinking of using the `contributes.extensionActions` to trigger some background tasks when the user opens a file. It seems like a way to avoid blocking the UI.". Considering Ben's statement and common practices, which of the following best describes what he intends to achieve with `contributes.extensionActions'?
Ben is correctly utilizing `contributes.extensionActions` for asynchronous tasks. This API allows extensions to perform operations like data retrieval or processing without blocking the main VS Code UI thread – a crucial element of responsive application design. The other options describe functionalities handled by different parts of the VS Code extension API, such as commands (contributes.commands), language providers (contributes.languages), and language settings.
35 / 45
During a standup meeting, Alex is explaining his progress on a new VS Code extension for JavaScript. He says, 'I've implemented the `contributes.languages` section to add support for TypeScript. I'm using an editor.definitionProvider to provide accurate Go-to-Definition suggestions when users type in code. However, it seems like my extension isn't showing up in the command palette—the user can't find it by typing 'TypeScript'. What is Alex most likely encountering with regards to the `editor.definitionProvider`?
Alex is likely struggling with how VS Code discovers and indexes language features defined using editor.definitionProvider within the contributes.languages section. The contributes.languages entry itself is correct; however, VS Code needs to be configured correctly to recognize this provider as a command or keybinding. This typically involves ensuring that the extension is properly registered and that VS Code's indexing mechanism is functioning correctly—the incorrect option suggests problems with documentation or architecture rather than configuration.
36 / 45
Sarah: "Hey team, I'm trying to add a new language support feature to the VS Code extension using the `contributes.languages` section in our package.json. But I keep getting this error saying my definition isn't being recognized. Any ideas?"
Which of the following best describes what Sarah is likely referring to when she mentions 'defining a language support feature'?
Sarah is referring to defining how VS Code should interpret and handle files of a specific type. The contributes.languages section within the package.json allows extensions to tell VS Code *how* to process those file types – for example, which syntax highlighting rules to apply or what code completion suggestions to offer. It's crucial to understand this distinction; simply 'detecting languages' isn't sufficient—you need to explicitly define the language support for each file type your extension handles.
37 / 45
David: "I'm reviewing this pull request and noticed the extension is registering a new command, myExtension.formatCode, but it doesn't seem to be properly defined in the package.json. Specifically, I see an entry for contributes.commands, which is great, but it lacks a fully specified command object with a name and execute property. What's David most likely concerned about regarding this command registration?"
David is focusing on the critical missing elements required for the VS Code extension to correctly register and make the `myExtension.formatCode` command accessible. The contributes.commands section *must* include a fully formed command object specifying the command's name (name) and the function or script that should be executed when it's triggered (execute). Without these, VS Code won't recognize the command and therefore won't make it available through the Command Palette or keybindings. He is highlighting a fundamental requirement for proper extension functionality.
38 / 45
Mark is working on a VS Code extension that provides code completion for Python. He's using a contributes.languages entry to register his language support. During a code review, Lisa comments: 'I noticed you're using the `languageSettings` property within your language definition. Are you sure you've correctly specified the `editor.codeActionsOnSave` setting to include things like formatting and linting?' What is Lisa most likely referring to when she mentions 'language settings'?
Lisa is pointing out a crucial aspect of defining language support: the `languageSettings` property within the contributes.languages entry. This setting controls which VS Code features are enabled and configured for that specific language – in this case, things like formatting on save or linting. Developers often overlook these settings, assuming that basic registration is enough; they're vital for tailoring the extension's behavior to the user's needs and ensuring a smooth development experience.
39 / 45
During a Slack discussion about improving the VS Code extension's performance, Ben says: "I'm thinking of using the `contributes.extensionActions` to trigger some background tasks when the user opens a file. It seems like a way to avoid blocking the UI.". Considering Ben's statement and common practices, which of the following best describes what he intends to achieve with `contributes.extensionActions'?
Ben is correctly utilizing `contributes.extensionActions` for asynchronous tasks. This API allows extensions to perform operations like data retrieval or processing without blocking the main VS Code UI thread – a crucial element of responsive application design. The other options describe functionalities handled by different parts of the VS Code extension API, such as commands (contributes.commands), language providers (contributes.languages), and language settings.
40 / 45
During a standup meeting, Alex is explaining his progress on a new VS Code extension for JavaScript. He says, 'I've implemented the `contributes.languages` section to add support for TypeScript. I'm using an editor.definitionProvider to provide accurate Go-to-Definition suggestions when users type in code. However, it seems like my extension isn't showing up in the command palette—the user can't find it by typing 'TypeScript'. What is Alex most likely encountering with regards to the `editor.definitionProvider`?
Alex is likely struggling with how VS Code discovers and indexes language features defined using editor.definitionProvider within the contributes.languages section. The contributes.languages entry itself is correct; however, VS Code needs to be configured correctly to recognize this provider as a command or keybinding. This typically involves ensuring that the extension is properly registered and that VS Code's indexing mechanism is functioning correctly—the incorrect option suggests problems with documentation or architecture rather than configuration.
41 / 45
Sarah: "Hey team, I'm trying to add a new language support feature to the VS Code extension using the `contributes.languages` section in our package.json. But I keep getting this error saying my definition isn't being recognized. Any ideas?"
Which of the following best describes what Sarah is likely referring to when she mentions 'defining a language support feature'?
Sarah is referring to defining how VS Code should interpret and handle files of a specific type. The contributes.languages section within the package.json allows extensions to tell VS Code *how* to process those file types – for example, which syntax highlighting rules to apply or what code completion suggestions to offer. It's crucial to understand this distinction; simply 'detecting languages' isn't sufficient—you need to explicitly define the language support for each file type your extension handles.
42 / 45
David: "I'm reviewing this pull request and noticed the extension is registering a new command, myExtension.formatCode, but it doesn't seem to be properly defined in the package.json. Specifically, I see an entry for contributes.commands, which is great, but it lacks a fully specified command object with a name and execute property. What's David most likely concerned about regarding this command registration?"
David is focusing on the critical missing elements required for the VS Code extension to correctly register and make the `myExtension.formatCode` command accessible. The contributes.commands section *must* include a fully formed command object specifying the command's name (name) and the function or script that should be executed when it's triggered (execute). Without these, VS Code won't recognize the command and therefore won't make it available through the Command Palette or keybindings. He is highlighting a fundamental requirement for proper extension functionality.
43 / 45
Mark is working on a VS Code extension that provides code completion for Python. He's using a contributes.languages entry to register his language support. During a code review, Lisa comments: 'I noticed you're using the `languageSettings` property within your language definition. Are you sure you've correctly specified the `editor.codeActionsOnSave` setting to include things like formatting and linting?' What is Lisa most likely referring to when she mentions 'language settings'?
Lisa is pointing out a crucial aspect of defining language support: the `languageSettings` property within the contributes.languages entry. This setting controls which VS Code features are enabled and configured for that specific language – in this case, things like formatting on save or linting. Developers often overlook these settings, assuming that basic registration is enough; they're vital for tailoring the extension's behavior to the user's needs and ensuring a smooth development experience.
44 / 45
During a Slack discussion about improving the VS Code extension's performance, Ben says: "I'm thinking of using the `contributes.extensionActions` to trigger some background tasks when the user opens a file. It seems like a way to avoid blocking the UI.". Considering Ben's statement and common practices, which of the following best describes what he intends to achieve with `contributes.extensionActions'?
Ben is correctly utilizing `contributes.extensionActions` for asynchronous tasks. This API allows extensions to perform operations like data retrieval or processing without blocking the main VS Code UI thread – a crucial element of responsive application design. The other options describe functionalities handled by different parts of the VS Code extension API, such as commands (contributes.commands), language providers (contributes.languages), and language settings.
45 / 45
During a standup meeting, Alex is explaining his progress on a new VS Code extension for JavaScript. He says, 'I've implemented the `contributes.languages` section to add support for TypeScript. I'm using an editor.definitionProvider to provide accurate Go-to-Definition suggestions when users type in code. However, it seems like my extension isn't showing up in the command palette—the user can't find it by typing 'TypeScript'. What is Alex most likely encountering with regards to the `editor.definitionProvider`?
Alex is likely struggling with how VS Code discovers and indexes language features defined using editor.definitionProvider within the contributes.languages section. The contributes.languages entry itself is correct; however, VS Code needs to be configured correctly to recognize this provider as a command or keybinding. This typically involves ensuring that the extension is properly registered and that VS Code's indexing mechanism is functioning correctly—the incorrect option suggests problems with documentation or architecture rather than configuration.
What does the "VS Code Extension API Vocabulary" exercise cover?
Practise VS Code extension API vocabulary: contribution points, activation events, commands, providers, and webviews.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to use with no account, sign-up, or paywall.
How many questions are in "VS Code Extension API Vocabulary"?
This exercise has 45 questions. Each one gives instant feedback with an explanation, so you can see exactly why an answer is right or wrong.
Do I need to create an account to save my progress?
No account is required. The progress bar and score are tracked in your browser for the current session -- the exercise is designed to be a quick, repeatable drill rather than something you resume later.
What happens if I get an answer wrong?
You'll see the correct answer highlighted immediately, along with a short explanation of why it's correct. Wrong answers aren't penalized beyond your score, and you can keep going through every question.
How is this exercise different from reading an article?
Articles explain vocabulary and concepts through prose, while exercises like this one are interactive drills -- multiple-choice questions -- that test and reinforce your recall of specific terms and phrasing.
Can I retry this exercise?
Yes -- use the "Try again" button on the results screen to reset your score and go through all the questions again from the start.
Where can I find more Developer Tools Engineering exercises?
Browse the full Developer Tools Engineering hub for related drills, or check the site-wide exercises index for other IT English topics.
Is this exercise suitable for beginners?
This exercise assumes basic familiarity with IT terminology. If a term feels unfamiliar, check the site Glossary for a plain-English definition before attempting the questions.
How often is new content like this published?
New exercises are added regularly across all categories, alongside new vocabulary sets and articles. Check back on the exercises hub to see what's new.