-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Launch preLaunchTask should complete before resolveDebugConfiguration #95162
Comments
…bugConfiguration
Good observation: launch config resolution and variable substitution should only take place after the preLaunchTask has finished. |
@gustavomassa I acknolwedge the behavior you have hit. However we were always behaving like that, we can change as you suggest to first run the I have just checked our docs and our API spec and as far as I saw we do not specify what should be run first.
|
I just tested this and we can not change it, since some For example, our starter Typescript extensions has the following launch configuration:
|
Thank you @isidorn for investigating this! From what you describe, there are two different needs:
Given that the order in which these are executed is arbitrary, a potential solution would be to propose another equivalent to So, we would have an order of execution like:
Is this a possibility that could be considered? |
@daniv-msft yes that is one option. Though please note that we already have a But is it possible that your extension simply handles this on it's own? |
@isidorn Thank you for your reply. I prototyped what you suggested, and running the task directly from the
Also, I'm not sure how sustainable it is on the long run. Typically, if in two months a timeout is added by VS Code on Looking again at the Typescript example you provide, I'm wondering if we could find a solution by resolving variables (such as |
@daniv-msft great to hear that the workaround is working for you. Yes the suggestion which you said that we only first resolve variables but do not call |
@daniv-msft @isidorn |
@weinand yes I guess we could also change it such that we run |
... and we would not run the second hook if preLaunchTask fails. |
Since that might potentialy break some clients I am assigning this to August so we do this change at the start of the August milestone so we have enough time to gather feedback. |
Thanks @isidorn, that sounds indeed reasonable. |
As we agreed upon I have pushed a change such that @daniv-msft it would be great if you try your use case and let us know if it works for you. VS Code insiders with this change should be out on Friday. |
Thanks @isidorn, that's great! I'll give this a try once the VS Code insiders release is available, and I will let you know how it goes. |
@isidorn I just wanted to confirm that I've been able to update our code according to the latest version of insiders, and I can confirm that the fix you pushed works for us. |
@weinand might be. Let's wait for the C++ team to investigate #105179 and let us know |
I can't think of any reason why this change would be a problem for C#. @WardenGnaw do you have the cycles to see what is going on with #105179? |
#105179 was reported by a member of the Language Service C++ team. The issue is "Build and Debug Active File" is a @isidorn @weinand Do we need to write the configuration selected to a Adding C++ Language Server Folks: |
@WardenGnaw no, you do not need to write configurations into |
Actually, it might be the If that call throws an exception, we call startDebugging with the full configuration. Did VS Code add a feature to show an error dialog when it could not find a matching name |
@WardenGnaw not that I can remember. |
@isidorn This is not a regression for 1.49.0 since this also appears in 1.48.1. It is due to trying to use vscode.debug.startDebugging with a configuration that does not exist in @sean-mcmanus We should validate if that configuration exists in launch.json instead of calling vscode.debug.startDebugging and using the thrown exception to detect if we should launch via configuration. |
Thanks for trying it in older versions, that always helps. |
Based on @daniv-msft comment adding verified label. |
When attaching to a program using cppdbg with processId as ${command:pickProcess}, the command pick does not wait for the preLaunchTask initialization/finalization, processId command pick should start just after the preLaunchTask finalization.
Please refer to this issue: microsoft/vscode-cpptools#5287
The text was updated successfully, but these errors were encountered: