コード例 #1
0
        private void UpdateState()
        {
            currentLine = ResolveLine(debugState.offset);

            switch (debugState.state)
            {
            case DebuggerState.State.Finished:
            {
                shouldReset = true;
                RemoveCurrentHighlight();
                var val = debugger.GetResult().ToString();
                MessageBox.Show("Execution finished, result was " + val);
                break;
            }

            case DebuggerState.State.Exception:
            {
                shouldReset = true;
                MessageBox.Show("Execution failed with an exception");
                JumpToLine(currentLine);
                break;
            }

            case DebuggerState.State.Break:
            {
                MessageBox.Show("Execution hit an breakpoint");
                JumpToLine(currentLine);
                break;
            }
            }
        }
コード例 #2
0
        private void UpdateState()
        {
            currentLine = ResolveLine(debugState.offset);

            switch (debugState.state)
            {
            case DebuggerState.State.Finished:
            {
                shouldReset = true;
                RemoveCurrentHighlight();
                var val = debugger.GetResult();

                StorageSave();

                var gasStr = string.Format("{0:N4}", debugger.GetUsedGas());

                MessageBox.Show("Execution finished.\nGAS cost: " + gasStr + "\nResult: " + FormattingUtils.StackItemAsString(val));

                break;
            }

            case DebuggerState.State.Exception:
            {
                shouldReset = true;
                MessageBox.Show("Execution failed with an exception");
                JumpToLine(currentLine);
                break;
            }

            case DebuggerState.State.Break:
            {
                MessageBox.Show("Execution hit an breakpoint");
                JumpToLine(currentLine);
                break;
            }
            }
        }