microsoft / vscode-generator-code

Visual Studio Code extension generator
Other
1.31k stars 225 forks source link

What should F5 do? #369

Open MrAmericanMike opened 2 years ago

MrAmericanMike commented 2 years ago

So I used yo code to generate a template for a Snippets Extension.

Reading vsc-extension-quickstart.md I see that it mentions Press `F5` to open a new window with your extension loaded.

However when I press F5 I get an error saying:

You don't have an extension for debugging "JSON with Comments". Should we find a "JSON with Comments" extension in the Marketplace?

Which I assume is not what should happen and I guess it's because my F5 key is doing something different.

What would be the way to get this working in order to test my Extension not having to manually copy it into .vscode/extensions manually each time?

aeschli commented 2 years ago

I'm not able to reproduce. Fro me F5 runs the provided launch config.

@isidorn Do you have some insights how the message above could have been shown?

isidorn commented 2 years ago

Yes it could happen that the user did not have a launch.json or that via a bug debugging was not aware of configuration in the launch.json. And then pressing F5 we would try to debug the current file by asking the debug extension to generate a launch configuration dynamically. Here we tried to do that for the JSON with Comments file.

fyi @roblourens

roblourens commented 2 years ago

I tried it too and it worked. @MrAmericanMike do you have a .vscode/launch.json file? Please make sure you haven't deleted that by accident.