| // Copyright 2015 the V8 project authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| // Flags: --no-always-opt --no-stress-opt |
| function listener(event, exec_state, event_data, data) { |
| if (event != Debug.DebugEvent.Break) return; |
| exec_state.frame(0).evaluate("a = 2"); |
| exec_state.frame(0).evaluate("e = 3"); |
| exec_state.frame(0).evaluate("bar()"); |
| exec_state.frame(0).evaluate("a++"); |
| exec_state.frame(0).evaluate("e++"); |
| Debug.setListener(listener); |
| // Make sure bar is 'used' so that it is visible to the debugger. |