NewTools
NewTools copied to clipboard
[Debugger] Highligting doesn't match the current node mapped according to the currentContext's pc
How to reproduce the bug
- Open a playground with CMD+O+W.
- Open a debugger, for example by executing
1 / 0
in the playground. - In the inspector, select
thisContext
and in the inspector pane, inspectself method sourceNodeForPC: self pc
.
You see that the AST node corresponding to the current pc isn't the node highlighted in the debugger.
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 ?