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
Questionable check for launch.json from file events #47021
Comments
Good catch that is an old heuristic that on debug restart we read the launch configuration from the In order to solve this properly we could:
|
The use case that triggered this was that a user edited a launch config and then aways restarted the debug session to pick up those changes. Since we get the launch configurations via the configuration service, we should not really have to deal with file events ourselves. Isn't there a general mechanism provided by the configuration service that notifies us to update our in-memory model? |
I understand that use case, but it would be covered by always re-reading before launch. My question is the other way around, what use case is there so we do not read it? You make a good point about the configuration service, and that is a good approach how to properly solve this on our end and not listen to file events. |
Doing unnecessary work is always bad ("Death by a thousand paper cuts"). Only if the configuration service caches the data for us (and knows when to invalidate the cache), then rereading it every time is acceptable. |
@weinand thanks for advice, I checked with Sandeep and the configuration service always caches. |
@weinand thanks for the analysis and the fix for that issue. |
@isidorn my proposal: For the launch config from #48333 this will still result in the problem (but IMO we can live with that rare corner case). |
See https://github.com/Microsoft/vscode/blob/b66f0ba3c70b08ffc046a9f1a6f56e0260129540/src/vs/workbench/parts/debug/electron-browser/debugService.ts#L1310
I think this check is no longer a good one because you can have launch configurations in the multi-root workspace file as well. Is this check still needed? It probably should know in which context it is (folder?) and then check specifically for that path and nothing else.
The text was updated successfully, but these errors were encountered: