2

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!

skaffman
  • 398,947
  • 96
  • 818
  • 769
andy
  • 8,775
  • 13
  • 77
  • 122

3 Answers3

3

Please file a bug report.

Mikayla Hutchinson
  • 16,113
  • 2
  • 44
  • 50
3

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(); 
}
fupsduck
  • 3,129
  • 1
  • 19
  • 18
  • thanks fupsduck, it'll try that out and get back to you. cheers! – andy Jan 11 '10 at 23:28
  • did you try compiling with the -debug flag on? – fupsduck Jan 12 '10 at 00:52
  • hmm... I think so. I clicked on the debug button, not the run button. I'll try tonight as my Mac's at home. cheers dude – andy Jan 12 '10 at 04:43
  • if it works with breakpoint on return 0, then try on Console.Read(). If that works but not when on Console.WriteLine() add int dummy; to top of file to start break on Console.WriteLine(). – fupsduck Jan 12 '10 at 05:15
1

For what it's worth, I can reproduce exactly what you're describing (Mac OS X, same versions, similar Hello World code, using a breakpoint on the first code line). However, as soon as I "Step Over" to the next line, the popup shows up correctly for "Console". As such, this behavior seems acceptable (at least to me).

fmr
  • 1,518
  • 13
  • 14
  • hmm... thanks fmr, that's good to know. My Mac's at home, but as soon as I get in tonight I'll give it another look. Could you tell me if you can also use the Immediate window ok? cheers! – andy Jan 12 '10 at 04:44
  • yes, same behavior for Immediate window. As soon as "Step Over" is performed, you can evaluate "Console.CapsLock" for example. – fmr Jan 12 '10 at 15:01
  • Like I said in the comments to my answer, it's know to be an issue that MD is currently only able to access types after they've been loaded by the debuggee. – Mikayla Hutchinson Jan 12 '10 at 20:12