Search code examples
macosmonomonodevelopimmediate-window

Debugging in Monodevelop on OSX not quite working


Hey guys, just installed on my Mac Snow Leopard OSX:

Mono 2.6 and Monodevelop 2.2

I've created a simple C# Console App:

public static void Main (string[] args)
    {
        Console.WriteLine ("Hello World!");
        Console.Read();
    }

When I start to type "Console" intellisense works perfectly.

When I run the app in Debug mode, breakpoints hit as expected.

However, while debugging with breakpoints, if I hover over "Console" it says "Unknown Identifier"

When I try and use the immediate window, nothing works. Anything I type just says "Unknown Identifier."

Anyone know what's going on?

cheers!


Solution

  • Try this and compiling with the -debug flag on:

    public static int Main (string[] args) 
    { 
        Console.WriteLine ("Hello World!"); 
        Console.Read(); 
        return 0; // Place breakpoint here
    }
    

    If that works then try this:

    public static void Main (string[] args) 
    { 
        int dummy;
        Console.WriteLine ("Hello World!"); // Place breakpoint here
        Console.Read(); 
    }