v
v copied to clipboard
Debugger not updating variable values correctly during array iteration
Describe the bug
Describe the bug
When setting a breakpoint on the line println('Hello, ${area} developers!') in the code below and checking the variable values during iteration over an array, the area variable appears to have an incorrect value on the first iteration and showing the previous value on each subsequent iteration.
module main
fn main() {
areas := ['game', 'web', 'tools', 'science', 'systems',
'embedded', 'drivers', 'GUI', 'mobile']
for area in areas {
println('Hello, ${area} developers!')
}
}
Expected Behavior
The area variable should have the correct value at each iteration of the loop.
Current Behavior
The area variable appears to have an incorrect value on the first iteration and showing the previous value on each subsequent iteration.
Reproduction Steps
- Open the code in PyCharm
- Set a breakpoint on the line println('Hello, ${area} developers!')
- Start debugging the code
- Check the value of the area variable at each iteration of the loop
Possible Solution
No response
Additional Information/Context
Something wrong with address area.str on the first iteration
V version
V 0.3.3 b7b6c23
Environment details (OS name and version, etc.)
OS: linux, Ubuntu 22.10 Processor: 8 cpus, 64bit, little endian, Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz CC version: cc (Ubuntu 12.2.0-3ubuntu1) 12.2.0
getwd: /home/strix/PycharmProjects/VTest vmodules: /home/strix/.vmodules vroot: /home/strix/v vexe: /home/strix/v/v vexe mtime: 2023-02-28 08:20:30 is vroot writable: true is vmodules writable: true V full version: V 0.3.3 15cb18c.b7b6c23
Git version: git version 2.37.2 Git vroot status: weekly.2023.08-35-gb7b6c236 .git/config present: true thirdparty/tcc status: thirdparty-linux-amd64 12f392c3