vscode: "Configured debug type 'python' is installed but not supported in this environment" if using shellExecutionSupported in package.json

Does this issue occur when all extensions are disabled?: No

  • VS Code Version: 1.62.0, 1.63.0-insider commit a7104f13f
  • Python extension version: 2021.11.1422169775 (stable), 2021.12.1436712109-dev (nightly)
  • OS Version: macOS Big Sur 11.6.1

(originally reported in https://github.com/microsoft/vscode-python/issues/17952)

We recently added shellExecutionSupported to the when clause of features of the Python extension that shouldn’t be exposed in virtual workspaces following the recommendation in https://github.com/microsoft/vscode-python/issues/17493#issuecomment-928986146.

However, this now causes a Configured debug type 'python' is installed but not supported in this environment warning to be displayed:

image

Steps to Reproduce:

  1. Install the Python extension (either stable or nightly/Insiders) in local VS Code
  2. Activate it in a workspace with Python files
  3. Go to Run and Debug and add a new debug configuration of type Python File
  4. Open launch.json and note the squiggles under the configuration type.

If I remove the && shellExecutionSupported part on https://github.com/microsoft/vscode-python/blob/5f46b3daf288e91e825e03adf83516f35b8cc457/package.json#L1490 and rebuild the extension, the squiggles won’t appear.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 7
  • Comments: 36 (19 by maintainers)

Most upvoted comments

Uninstall Jupyter, then re-install should resolve it. Jupyter Screenshot er

When does the fix get released. I had to downgrade two versions to remove the message.

the “popup in your launch.json” is just wrong - it’s a bug in VS Code.

Strange, but for me I also had to uninstall and reinstall python in addition to Jupyter. In any case, uninstalling was definitely the nudge in the right direction. (Thanks @hunglnguyen)

Lol, very unexpected fix

@weinand The set of context variable that can be used in when clauses is open. But you can ask the when clause for the variables it contains. (IContextKeyExpression.keys) and listen for context key changes (IContextKeyService.onDidChangeContext with IContextKeyChangeEvent.affectsSome)

@kimadeline please file a feature request for a new context key for this situation.

As suggested above by @Olsthoorn:

downgrade to the previous version

the “popup in your launch.json” is just wrong - it’s a bug in VS Code.

Would be nice to have some end user advice on this - right now it’s all insider talk about resolution. Agreed that this is necessary but I hate having a non-empty problem list.

@weinand I would opt for option 1, where shellExecutionSupported isn’t used outside of tasks. The context is documented and suggested for task definitions as is.

Seeing this pop up in my launch.json is a little perplexing, I don’t follow the comments above, and from what I can see, the settings seem to apply to executing in a browser maybe? My apps are server-side command line apps, so the stuff being mentioned here seems to not even be germane to me.