Python extension should activate on onDebugInitialConfigurations
See original GitHub issueHi VS Code dev here 👋
- Have python extension installed, workspace without a launch.json.
- Do not open a python file
- Press “Open launch.json” in the Debug viewlet
- Python options are not presented 🐛
The issue for this is because Python extension did not get activated since no python file got opened.
I suggest that python extension gets activated also for onDebugInitialConfigurations
event. This event is fired when the launch.json
is about to get populated for the first time.
fyi @luabud
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:18 (2 by maintainers)
Top Results From Across the Web
Activation Events | Visual Studio Code Extension API
This activation event is emitted and interested extensions will be activated whenever a file that resolves to a certain language gets opened.
Read more >Python in Visual Studio Code – November 2021 Release
Nayana Vinod and Jessica Jolly: Python extension now activates on onDebugInitialConfigurations. (#9557). Last but not least, special thanks to ...
Read more >How would I fix the issue of the python extension loading and ...
Uninstall Python extension (if you have pylance uninstall it first). · Close all instances of VS Code. · Go to, %USERPROFILE%/. · Delete...
Read more >Using Visual Studio Code Extensions for Persistence - Medium
activationEvents — The event(s) that will trigger the extension, ... a file containing code of a specific language (e.g. Rust, Python, etc.) ...
Read more >Setting up the Python extension for Microsoft Visual Studio Code
How to set up and get started with the Python extension for Visual Studio Code.Follow TECH(talk) for ... Your browser can 't play...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dantup please create an issue in vscode and we can continue the discussion there. Also this event will only be fired the very first time the launch.json is getting created. It will not be fired every time a user wants to debug.
I think it’s more than that. It’s pretty common to open a project and (with no files open) just hit
F5
. The more languages that do this, the more options the user has to read through to figure out what they need to select 😞It also means that the extension will almost always be activated (anytime someone wants to debug any type of project your extension will now be activated). The C# extension does this and I’m frequently seeing it start downloading SDK/dependencies when I’m starting to debug a Dart project.
I appreciate this is the wrong issue tracker for it, but I think VS Code really needs better APIs here. In addition to the bad UX, there’s a perf implication - the more languages that subscribe to this, the slower pressing F5 will be as a bunch of extensions all start running activating code (and potentially spawning language servers, etc).