IBM i Debugger Comes to VS Code
February 15, 2023 Alex Woodie
At long last, IBM i developers can now debug their code in a development environment other than Rational Developer for IBM i or Merlin. The news came last week, when Liam Allan announced that the ILE debugging feature is now available in Code for IBM i, his third-party, IBM i-centric plug-in for Visual Studio Code.
“Debugging ILE COBOL and RPGLE inside @code like it’s any other day!” Allan tweeted from his @Notesofbarry Twitter account. “I’m pumped for this release #ibmi.”
Indeed, this day has been a long time in coming. Allan, who has not been shy about sharing his dislike for RDi, has been pushing IBM to unhook the debugger from RDi for years.
He started getting vocal about the debugger years ago when he first started developing ILEditor, his first stab at a lightweight alternative to RDi for RPG developers. And he continued his crusade as he put his effort into Code for IBM i, the free VSCode plug-in that he and his partner developed at Halcyon Software.
Allan’s efforts to free the debugger got a big boost last year when IBM launched Merlin, its own lightweight, browser-based alternative to the heavyweight, Java-based RDi client. Like Code for IBM i, Merlin runs on a VS Code base, and also includes open source tools like Git and Jenkins to manage CI/CD processes, as well as IBM i tooling from ARCAD Software (not to mention the OpenShift container from Red Hat).
IBM created and launched Merlin because it saw the same thing that Allan saw: A desire among the IBM i installed base for an easier-to-use, lighter weight, and more open development environment. These open IDEs were already available for IBM i developers working in open source languages, like PHP, Python, and Node.js. But there was a gap in the IBM lineup when it came to native ILE languages commonly used on IBM i, like RPG and COBOL.
When it launched Merlin, IBM realized that it would eventually have to unhook the debugger from RDi. The fact that IBM went ahead and pushed Merlin to market without an integrated debugger – which would prevent them from fully testing RPG and COBOL apps for production – shows how motivated it was to get the product into developer’s hands.
In any case, IBM officials said at last year’s COMMON POWERUp conference that they had already unhooked the debugger from RDi and the IBM Toolbox for Java, where it’s bundled as a JAR file, and had a working copy running in the lab. It was only a matter of testing the newly unhooked debugger with Merlin and ensuring it was ready for prime time, the officials told us.
And true to the officials’ word, IBM announced the Merlin debugger as part of the fall Technology Refresh for IBM i 7.5, 7.4, and 7.3. You can read more about the IBM i Debugger for Merlin here in the IBM documentation.
Now it’s Code for IBM i’s turn to integrate the debugger. Last week, Allan announced the availability of IBM i Debug on the Visual Studio Marketplace. The plug-in, which is based on the IBM Debugger, provides a Debug Adapter Protocol (DAP) client and works with either Merlin or Code for IBM i, according to the product description.
According to IBM i Debug documentation, the debugging service requires the installation of a PTF (a different one depending on if you’re running IBM i 7.3, 7.4, or 7.5). Code for IBM i will walk the user through the setup process for the debug service, if it’s not already running.
Once the debug service is up and running, the user can work with it through the UI for Code for IBM i. Users can launch a debug session with just the click of a button. According to the documentation, the debugger supports a run mode. Breakpoints can be set prior to debugging, or set during the debugging session.
Freeing the IBM i debugger from RDi has been a goal of many people in the IBM i community for a long time. And with connections to Merlin and Code for IBM i, there are two places developers can put the newly freed debugger to work.