NewTools icon indicating copy to clipboard operation
NewTools copied to clipboard

[Debugger] Highligting doesn't match the current node mapped according to the currentContext's pc

Open adri09070 opened this issue 2 years ago • 0 comments

How to reproduce the bug

  1. Open a playground with CMD+O+W.
  2. Open a debugger, for example by executing 1 / 0 in the playground.
  3. In the inspector, select thisContext and in the inspector pane, inspect self method sourceNodeForPC: self pc.

You see that the AST node corresponding to the current pc isn't the node highlighted in the debugger.

image

Why is it a bug ?

The node that is highlighted should be the next node that will be executed by a step over. We don't really know if it is as the context is in contradiction with this, which is misleading.

Cause of the bug The cause of the bug needs to be investigated. Maybe, this is because some instrumented code needs to be executed before reaching the return node ?

adri09070 avatar Aug 29 '22 13:08 adri09070