Debugging Mono Applications with VSCode on Mac OS X


Debugging a Mono AppI wrote in a recent post that Visual Studio Code does not support debugging Mono and ASP.NET 5 applications on Linux or Mac OS X in the preview version which was released last week. As Isidor Nikolic pointed out I’m wrong about Mono. VSCode supports debugging Mono applications. In this post I show how you must configure your launch settings.

When you click on the gear icon on the debug pane VSCode opens .settings/launch.json. Just add the following launch settings and adapt it to your Mono project:

    "version": "0.1.0",
    // List of configurations.
    // ONLY "node" and "mono" are supported, change "type" to switch.
    "configurations": [
            // Name of configuration
            // Appears in the launch configuration drop down menu.
            "name": "Launch <PROJECT NAME>",
            // Type of configuration. Possible values: "node", "mono".
            "type": "mono",
            // Workspace relative or absolute path to the program.
            "program": "<PATH TO EXECUTABLE FILE>",
            // Automatically stop program after launch.
            "stopOnEntry": true

After building your Mono application you can set a breakpoint and launch the debugger.