Skip to content

Commit 0094534

Browse files
update tests
1 parent f59b9fa commit 0094534

File tree

2 files changed

+276
-38
lines changed

2 files changed

+276
-38
lines changed

src/extension/debugger/inlineValue/pythonInlineValueProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class PythonInlineValueProvider implements InlineValuesProvider {
7070
.map((variable: any) => variable.name);
7171

7272
let variableRegex = new RegExp(
73-
'(?:self.)?' + //match self. if present
73+
'(?:[a-zA-Z_][a-zA-Z0-9_]*\\.)*' + //match any number of variable names separated by '.'
7474
'[a-zA-Z_][a-zA-Z0-9_]*', //math variable name
7575
'g',
7676
);
@@ -92,7 +92,7 @@ export class PythonInlineValueProvider implements InlineValuesProvider {
9292
continue;
9393
}
9494
if (pythonVariables.includes(varName.split('.')[0])) {
95-
if (varName.includes('self')) {
95+
if (varName.includes('.')) {
9696
const rng = new Range(l, match.index, l, match.index + varName.length);
9797
allValues.push(new InlineValueEvaluatableExpression(rng, varName));
9898
} else {

0 commit comments

Comments
 (0)