Skip to content

Commit 857628a

Browse files
update tests
1 parent 0aafb3f commit 857628a

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
@@ -68,7 +68,7 @@ export class PythonInlineValueProvider implements InlineValuesProvider {
6868
.map((variable: any) => variable.name);
6969

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

0 commit comments

Comments
 (0)