Blizzard has published a blog discussing the way that their Diablo IV team debugs remote Linux binaries in Visual Studio through the use of Windows Subsystem for Linux (WSL).
Bill Randolph, senior software engineer at Blizzard, explains the technique along with an explanation of why the team follows this structure.
...our team’s core competency is on Windows. Even our server programmers are most familiar with Windows development, and we appreciate the ability for all the programmers on our team to use a common toolset and knowledge base.
The other, and most important reason that we develop on Windows is the functionality and robust toolset provided by Visual Studio. There is nothing quite comparable in the Linux world, even if we were to develop natively in Linux.
Windows Subsystem for Linux is available for Windows 10 and provides users the ability to run multiple Linux distributions, with full shells and isolated environments, on a single computer. The experience is similar to virtual machines but does not require the same level of overhead for setting up and turning the VM on and off. Similarly, instead of downloading each Linux distribution directly, users can install Ubuntu or other distributions directly through Microsoft’s AppStore.
The ability to debug Linux core dumps in WSL supports the backend services of Diablo IV rather than the frontend game that runs on Mac/Windows and consoles. Backend services support Blizzard’s Battle.net platform and include capabilities like online multiplayer, messaging, tournaments, and other features for how users interact with the game and other players.
Randolph explains the deployment structure for how builds occur, get deployed, and then how core dumps come back when unexpected errors occur. Builds occur on a Linux system (native, not WSL) and are then deployed through containers. An automated monitoring system detects when core dumps occur and brings the dump back along with the binary for further investigation by a member of the team.
The team is able to use a native Visual Studio analysis tool called Parallel Stacks, that provides a visual walkthrough and mapping between stacks and communication between threads. Similar to JDK Mission Control for Java developers, this gives a visual representation of what was happening on different threads as it relates to the stack or each thread.
This type of cross-platform build analysis is happening for many teams but is not suited for all cases. Randolph praises the capability.
Our team is very excited about the ability to debug Linux cores from our production environment in Visual Studio! It is a game changer for us, as it allows many more developers to actively diagnose problems "in the wild," and it makes the powerful toolset of Visual Studio debugging available to all of us.
In favor of native Linux, JRuby developer Charles Nutter drew attention to a "subtle jab" at virtualized Linux environments written by laptop-maker System76, "Quickly compile your code with an 11th Gen Intel Core i7 CPU and up to 40GB RAM. Use all your favorite development tools in a native environment and drastically reduce post-deployment surprises."
All development teams are free to make their own decisions about toolchains and techniques used based on their skill sets. The release date for Diablo IV has not yet been announced, but the Visual Studio tools needed to debug Linux core dumps are available now.