Scribble
  • Introduction
  • Scribble Generator
  • Tool
    • Installation
    • CLI Usage
      • Arm and disarm
    • Assertion Checking Modes
    • Instrumented Code
      • Debugging Instrumented Code
    • JSON output specification
    • FAQ
  • Language
    • Introduction
    • Annotations
      • Function Annotations
      • State Variable Annotations
      • Contract Invariants
      • Scribble Functions
      • Assert Annotations
      • Macros
      • Hints
    • Expressions
      • Quantification
  • Tutorials
    • Property Checking with Scribble and MythX
    • Property Checking with Scribble and Mythril
    • In-place testing with Scribble
Powered by GitBook
On this page

Was this helpful?

  1. Tool
  2. Instrumented Code

Debugging Instrumented Code

PreviousInstrumented CodeNextJSON output specification

Last updated 4 years ago

Was this helpful?

We are working on adding more tooling for debugging your instrumented code. At the moment there are several guidelines to help you if you get stuck:

  1. Check out the page to understand how Scribble instruments.

  2. Use descriptive user-readable labels and look at emitted events to understand which property failed.

  3. If you are using event-based assertions mode, you can use the --debug-events option, which will emit an additional event for each failure that holds the values of primitive variables appearing in the event.

  4. If you have added contract-wide invariants and your contracts are failing to be deployed, be aware that contract-wide invariants are checked at the end of constructors. So if your invariant doesn't hold at the end of the constructor, it will prevent it from being deployed. If you are having trouble deploying instrumented contracts with invariants, you should also read the section on .

  5. Be aware of cases where your invariant evaluation itself may cause a failure. Specifically if you are using the division opreator or calling some pure/view function which may fail under some conditions.

  6. If scribble is generating code that doesn't compile or generating otherwise invalid code, feel free to reach out and .

  7. You can also find us on the #scribble channel of the .

Understanding Instrumented Code
external calls in invariants
file an issue
MyhtX Discord Server