skip to Main Content

In VS code how can I see the current value of a specify setting variable?

For example: I have the Code Runner extension installed. In the Feature contribution page I saw that it has a setting variable

code-runner.executorMap (Set the executor of each language.)

How can see the current value of this setting? Is there a way to display this value? Or do I need to trawl through the different JSON setting files (Default/User/Workspace) to then determine its current value?

2

Answers


  1. Maybe you can use this https://code.visualstudio.com/api/references/vscode-api#WorkspaceConfiguration.

    const myWorkbench = vscode.workspace.getConfiguration('myWorkbench')
    const yourConfigValue = myWorkbench.get('yourConfigValue')
    
    Login or Signup to reply.
  2. (1) You can view the value of many specific setting variables via the settings editor in VS Code. There’s a web page describing all aspects of that, including settings for extensions.

    To modify user settings, you’ll use the Settings editor to review and change VS Code settings.

    To open the Settings editor, use the following VS Code menu command:

    • On Windows/Linux – File > Preferences > Settings
    • On macOS – Code > Preferences > Settings

    You can also open the Settings editor from the Command Palette (โ‡งโŒ˜P) with Preferences: Open Settings or use the keyboard shortcut (โŒ˜,).

    (2) However some settings – like the one you mention (code-runner.executorMap) – cannot directly be viewed in the settings editor. They just show up with a "Edit in settings.json" link.

    When you click that link VS Code will possibly add the default value for that variable to your user or workspace settings file. Be aware of this.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search