goldrik
goldrik

Reputation: 115

VSCode set shortcut "when" context to detect set breakpoints

I'm trying to set a keyboard shortcut for the command python.debugInTerminal on Visual Studio Code, but I would like it to run only when a breakpoint is created in the file. Inversely, if there are no set breakpoints in the file, this command should not run.

Is there a "when" context term to define this? For example, there is one called breakpointsFocused, but I dont think this is right.

Upvotes: 0

Views: 72

Answers (1)

Mark
Mark

Reputation: 182341

There is a breakpointsExist true/false context key.

Open the Developer Tools/Console and then invoke the command

Developer: Inspect Context Keys

and click anywhere in vscode. Then in the Console open up the last object which should have a long list of available context keys. Search for breakpoint and there are a few.

Upvotes: 1

Related Questions