How to use the @truffle/debug-utils.colorize function in @truffle/debug-utils

To help you get started, we’ve selected a few @truffle/debug-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github trufflesuite / truffle / packages / core / lib / debug / printer.js View on Github external
throw new Error("Unknown selector: %s", expr);
      }

      // throws its own exception
      result = this.session.view(selector);

      return result;
    };

    this.colorizedSources = {};
    for (const source of Object.values(
      this.session.view(solidity.info.sources)
    )) {
      const id = source.id;
      const uncolorized = source.source;
      const colorized = DebugUtils.colorize(uncolorized);
      this.colorizedSources[id] = colorized;
    }
  }