Skip to content

Commit c37dc54

Browse files
authored
Cherry pick debug caching fix to release (#17355)
* Fix for cached debug configuration (#17354) * Update change log for cherry pick
1 parent 4a2c7d8 commit c37dc54

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44

55
### Fixes
66

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

3234
### Thanks
3335

src/client/debugger/extension/configuration/debugConfigurationService.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,19 @@ export class PythonDebugConfigurationService implements IDebugConfigurationServi
8080
// editor context where it was triggered.
8181
throw Error('This configuration can only be used as defined by `purpose`.');
8282
} else {
83-
if ((await this.experiments.inExperiment(CacheDebugConfig.experiment)) && this.cacheDebugConfig) {
84-
debugConfiguration = cloneDeep(this.cacheDebugConfig);
85-
}
8683
if (Object.keys(debugConfiguration).length === 0) {
87-
const configs = await this.provideDebugConfigurations(folder, token);
88-
if (configs === undefined) {
89-
return;
90-
}
91-
if (Array.isArray(configs) && configs.length === 1) {
92-
debugConfiguration = configs[0];
84+
if ((await this.experiments.inExperiment(CacheDebugConfig.experiment)) && this.cacheDebugConfig) {
85+
debugConfiguration = cloneDeep(this.cacheDebugConfig);
86+
} else {
87+
const configs = await this.provideDebugConfigurations(folder, token);
88+
if (configs === undefined) {
89+
return;
90+
}
91+
if (Array.isArray(configs) && configs.length === 1) {
92+
debugConfiguration = configs[0];
93+
}
94+
this.cacheDebugConfig = cloneDeep(debugConfiguration);
9395
}
94-
this.cacheDebugConfig = cloneDeep(debugConfiguration);
9596
}
9697
return this.launchResolver.resolveDebugConfiguration(
9798
folder,

0 commit comments

Comments
 (0)