You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tested on VSCode 1.66.x. Does not seem to occur with 1.65.x
Run some code
stop on a break point.
some variables assigned by code prior to beakpoint (e.g. A = 10, B = 30)
execute a function that returns multiple variable and put into existing variables in local context (e.g. A, B = some_fun())
A does not get assigned with a new value.
Here is some code that reproduces the problem (with line numbers). Set a breakpoint on line
import numpy as np
def some_fun():
return np.random.randn(), np.random.randn()
def some_fun_2():
return np.random.randn()
def main():
A = 10
B = 34
C = 11
A, B = some_fun() # this assignment works when stepping
print(A) # break on this line
Once the code has stopped on breakpoint, execute A, B = some_fun() in the Debug Console to experiment the bug.
These have the same erroneous behaviour: A, B = np.random.randn(), np.random.randn() B, A = np.random.randn(), np.random.randn() B, A = some_fun()
However, A = some_fun_2() works fine.
python 3.8.10
Extension version: 2022.4.1
VS Code version: Code 1.66.2 (dfd34e8260c270da74b5c2d86d61aee4b6d56977, 2022-04-11T07:49:20.994Z)
OS version: Darwin x64 20.6.0
Restricted Mode: No
System Info
Item
Value
CPUs
Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz (12 x 2600)
It seems that variables that already exist in the local context are the ones affected by this bug.
Executing multiple lines in the debug console also triggers this bug. For example, say that a, b, and c already exist when stopping on breakpoint, executing those 3 lines using the console will only modify the contents of c. a = np.random.randn() b = np.random.randn() c = np.random.randn()
However, if I run these lines instead (with d not already existing): d = np.random.randn() b = np.random.randn() c = np.random.randn()
Only d gets created and assigned. b and c are left untouched.
Issue Type: Bug
Tested on VSCode 1.66.x. Does not seem to occur with 1.65.x
Here is some code that reproduces the problem (with line numbers). Set a breakpoint on line
Once the code has stopped on breakpoint, execute A, B = some_fun() in the Debug Console to experiment the bug.
These have the same erroneous behaviour:
A, B = np.random.randn(), np.random.randn()
B, A = np.random.randn(), np.random.randn()
B, A = some_fun()
However,
A = some_fun_2()
works fine.python 3.8.10
Extension version: 2022.4.1
VS Code version: Code 1.66.2 (dfd34e8260c270da74b5c2d86d61aee4b6d56977, 2022-04-11T07:49:20.994Z)
OS version: Darwin x64 20.6.0
Restricted Mode: No
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: