Skip to content

Cherry pick debug caching fix to release #17355

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

Merged
merged 2 commits into from
Sep 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@

### Fixes

1. Fix for debug configuration used when no launch.json exists is still used after launch.json is created.
([#17353](https://github.com/Microsoft/vscode-python/issues/17353))
1. Ensure default python executable to use is 'python' instead of ''.
([#17089](https://github.com/Microsoft/vscode-python/issues/17089))
1. Ensure workspace interpreters are discovered and watched when in `pythonDiscoveryModuleWithoutWatcher` experiment.
([#17144](https://github.com/Microsoft/vscode-python/issues/17144))
1. Do path comparisons appropriately in the new discovery component.
([#17244](https://github.com/Microsoft/vscode-python/issues/17244))
1. Fix for test result not found for files starting with py.
([#17270](https://github.com/Microsoft/vscode-python/issues/17270))
1. Fix for unable to import when running unittest.
([#17280](https://github.com/Microsoft/vscode-python/issues/17280))
1. Fix for multiple folders in `pytest` args.
Expand All @@ -26,8 +30,6 @@
([#17309](https://github.com/Microsoft/vscode-python/issues/17309))
1. For CI ensure `tensorboard` is installed in python 3 environments only.
([#17325](https://github.com/Microsoft/vscode-python/issues/17325))
1. Fix for test result not found for files starting with py.
([#17270](https://github.com/Microsoft/vscode-python/issues/17270))

### Thanks

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,19 @@ export class PythonDebugConfigurationService implements IDebugConfigurationServi
// editor context where it was triggered.
throw Error('This configuration can only be used as defined by `purpose`.');
} else {
if ((await this.experiments.inExperiment(CacheDebugConfig.experiment)) && this.cacheDebugConfig) {
debugConfiguration = cloneDeep(this.cacheDebugConfig);
}
if (Object.keys(debugConfiguration).length === 0) {
const configs = await this.provideDebugConfigurations(folder, token);
if (configs === undefined) {
return;
}
if (Array.isArray(configs) && configs.length === 1) {
debugConfiguration = configs[0];
if ((await this.experiments.inExperiment(CacheDebugConfig.experiment)) && this.cacheDebugConfig) {
debugConfiguration = cloneDeep(this.cacheDebugConfig);
} else {
const configs = await this.provideDebugConfigurations(folder, token);
if (configs === undefined) {
return;
}
if (Array.isArray(configs) && configs.length === 1) {
debugConfiguration = configs[0];
}
this.cacheDebugConfig = cloneDeep(debugConfiguration);
}
this.cacheDebugConfig = cloneDeep(debugConfiguration);
}
return this.launchResolver.resolveDebugConfiguration(
folder,
Expand Down