Paul Krill
Editor at Large

Iroh brings dynamic code analysis to JavaScript

news
Sep 14, 20171 min

Open source testing tool collects runtime data to reveal how JavaScript code behaves during execution

abstract blue binary code
Credit: Thinkstock

Static analysis tools reveal potential bugs by spotting common coding mistakes. But you never really know what your code will do until you run it. An open source tool called Iroh.js, currently in beta development, allows JavaScript developers to perform dynamic code analysis to see exactly how their code behaves at execution.

Iroh enables developers to record code flow in real time. It also can intercept runtime information and manipulate program behavior on the fly. Runtime values such as parameters or variables can be captured while code is running. “You can, for example, collect type information and even manipulate the running program because of the access to all runtime data,” developer Felix Maier said. 

Available on GitHub, Iroh patches code to record what is happening without changing the original program. Developers can add listeners and then track activity. Iroh also keeps track of the call stack, for viewing code flow, but cannot record what is happening inside native calls, external functions, or unpatched functions.

Iroh has been tested with jQuery. Full ECMAScript 5 support is on the roadmap, with a subset of the more-recent ES6 specification already backed.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author