Skip to content

raineorshine/eth-debug-lines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eth-debug-lines

npm version

Injects Solidity source code with DebugLine events to allow per-line error reporting.

Install

$ npm install --save eth-debug-lines

CLI Usage

$ eth-debug-lines < MyContract.sol

API Usage

const injectDebugLines = require('eth-debug-lines')

const src = `contract MyContract {
  function foo() {
    uint a;
    uint b;
    uint c;
  }
}`

console.log(injectDebugLines(src))

/* Output:

contract MyContract {

  // INJECTED
  event DebugLine(uint line);

  function foo() {
DebugLine(3);
    uint a;
DebugLine(4);
    uint b;
DebugLine(5);
    uint c;
  }
}
*/

Issues

Before reporting, please makes sure your source is parseable via solidity-parser.

License

ISC © Raine Revere

About

Injects Solidity source code with DebugLine events to allow per-line error reporting.

Resources

License

Stars

Watchers

Forks

Packages

No packages published