Skip to content

Commit

Permalink
Merge pull request trufflesuite#130 from trufflesuite/meaningful-next
Browse files Browse the repository at this point in the history
Update truffle-debugger selectors
  • Loading branch information
gnidan authored May 3, 2018
2 parents 88a0d21 + c3b204e commit 4a1274e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/truffle-core/lib/commands/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ var command = {
function printFile() {
var message = "";

var sourcePath = session.view(solidity.next.source).sourcePath;
var sourcePath = session.view(solidity.current.source).sourcePath;

if (sourcePath) {
message += path.basename(sourcePath);
Expand All @@ -126,8 +126,8 @@ var command = {
}

function printState() {
var source = session.view(solidity.next.source).source;
var range = session.view(solidity.next.sourceRange);
var source = session.view(solidity.current.source).source;
var range = session.view(solidity.current.sourceRange);
debug("source: %o", source);
debug("range: %o", range);

Expand All @@ -150,7 +150,7 @@ var command = {
}

function printInstruction() {
var instruction = session.view(solidity.next.instruction);
var instruction = session.view(solidity.current.instruction);
var step = session.view(trace.step);
var traceIndex = session.view(trace.index);

Expand Down Expand Up @@ -240,7 +240,7 @@ var command = {
}

function printVariables() {
var variables = session.view(data.identifiers.native.current);
var variables = session.view(data.current.identifiers.native);

// Get the length of the longest name.
var longestNameLength = Math.max.apply(null, (Object.keys(variables).map(function(name) {
Expand All @@ -266,7 +266,7 @@ var command = {
}

function evalAndPrintExpression(expr, indent, suppress) {
var context = session.view(data.identifiers.native.current);
var context = session.view(data.current.identifiers.native);
try {
var result = safeEval(expr, context);
var formatted = formatValue(result, indent);
Expand Down Expand Up @@ -296,7 +296,7 @@ var command = {

function toggleBreakpoint() {
var currentCall = session.view(evm.current.call);
var currentNode = session.view(ast.next.node).id;
var currentNode = session.view(ast.current.node).id;

// Try to find the breakpoint in the list
var found = false;
Expand Down Expand Up @@ -417,7 +417,7 @@ var command = {
case "u":
case "n":
case "c":
if(!session.view(solidity.next.source).source) {
if(!session.view(solidity.current.source).source) {
printInstruction();
}

Expand Down

0 comments on commit 4a1274e

Please sign in to comment.