C# System.Diagnostics.Debugger.Debug() stopped working
        Posted  
        
            by Andrew Miner
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Andrew Miner
        
        
        
        Published on 2010-03-19T03:03:52Z
        Indexed on 
            2010/03/19
            3:11 UTC
        
        
        Read the original article
        Hit count: 349
        
I'm working on a program which uses the System.Diagnostics.Debugger.Break() method to allow the user to set a breakpoint from the command-line. This has worked fine for many weeks now. However, when I was working on fixing a unit test today, I tried to use the debug switch from the command-line, and it didn't work.
Here's what I've tried:
- I've confirmed that the Debug() method is really being called (by putting a System.Console.WriteLine() after it)
 - I've confirmed that the build is still in Debug
 - I've done a clean build
 - I've restarted Product Studio
 
A quick Google search didn't reveal anything, and the API documentation for .Net doesn't mention anything about this function not performing correctly. So... any ideas?
© Stack Overflow or respective owner