Time Travel to Right Before Error Occurs

Launch Debugger Directly From Failed Tests

sCrypt IDE v0.4.13 lets you launch a debugger that stops right at where sCrypt test fails. This will help developers to locate contract bugs tremendously.

Previously, when a test fails using the sCrypt testing framework, error message only shows where it fails in JavaScript/TypeScript code. If a user has to find out where it fails inside the sCrypt code, he has to print out debug arguments, copy and paste them into launch.json, which is a laborious and error-prone process.

Launch Debugger Right From a Failed sCrypt Test

In the latest IDE, when a test fails, there are two additional lines in the error message.

  • Go to Source: it shows which line fails inside sCrypt code and also the last opcode executed. Right clicking on the link will take you directly to the offending line.
  • Launch Debugger: Right clicking on the link will directly launch a debugger session, based on arguments in the test. The debugger will pause right before the error about to occur, allowing inspection of what caused the failure.
Debug Info in Output

Happy debugging!

Written by

sCrypt Inc is a company with mission to providing integrated on-chain smart contracting solutions on Bitcoin SV. https://scrypt.io

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store