New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Continue improving "Run and Debug" experience #150663
Comments
Works fine for me, can you explain some more what happens? Didn't check but I think this would be "initial" triggerKind |
@roblourens |
I think "Add Configuration" will always create a launch.json, that is the idea of that command as far as I'm aware. So you want to run "Add configuration" to start debugging without a launch.json? |
Is that the same as what the Debug: Select and Start Debugging command does? If so, maybe there should be an additional entry here - one for creating the config, and one for running an automatic one without creating a |
We want to start debugging without creating the launch.json, which using the
I think that is right. An additional entry for creating the configs would be useful. |
Add Configuration will create a launch config, that is the point of that command. But you will have to register for Initial to use it. I think that it's a little confusing that Initial configs will just run in some scenarios and go towards a launch.json in others. It makes the distinction between Initial and Dynamic a little confusing and we should think about that some more. |
@roblourens we have registered for Dynamic, but we would like to have this feature to still work. Right now we have added a separate "Add Configuration" button for our extension to add configurations to a launch.json. But it would be helpful if this feature works. |
I think I'm not clear on which scenario you're trying to avoid by not registering for Initial? |
I believe the scenario @elahehrashedi is referring to is this:
I would have expected that if my extension registers a debug configuration provider with Between "initialConfigurations", "configurationSnippets", "DebugConfigurationProviderTriggerKind" (btw, is it an enum or bit flags?) and the fact that when starting debugging without launch.json, the first method invoked on the debug config provider is |
@roblourens I ran into this problem revamping the debug configurations for the Microsoft PowerShell extension. only pulls from the hardcoded JSON in configurationSnippets rather than what I provide in This however works just fine and how I expect: Is there a good reason why these two appear to use different code paths? They seem to be accomplishing the same goal. A major advantage of having dynamic launch configs is that I would be able to discover an initial entrypoint, but still allow them to change it, rather than relying on ${file} or some other special variable. I am registering for both [
DebugConfigurationProviderTriggerKind.Initial,
DebugConfigurationProviderTriggerKind.Dynamic
].forEach(triggerKind => {
context.subscriptions.push(debug.registerDebugConfigurationProvider("PowerShell", this, triggerKind));
}); |
The "Run and Debug" experience with no launch.json and no open editor could be improved further. See notes from #146338 (comment). Also,
The text was updated successfully, but these errors were encountered: