Bug 401 - MD ignores DebuggerHiddenAttribute
Summary: MD ignores DebuggerHiddenAttribute
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: Trunk
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2011-08-25 06:20 UTC by Marek Safar
Modified: 2012-08-03 10:06 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Marek Safar 2011-08-25 06:20:12 UTC
using System;
using System.Collections.Generic;
using System.Diagnostics;

class A
{
	[DebuggerHidden]
	public static void Test ()
	{
		Test2 (); // MD allows to set and hit breakpoint here, where VS reports "The breakpoint will not currently be hit. Breakpoints cannot be set in method or class with 'DebuggerHidden' attribute when the debugger option 'Just My Code' is enabled
	}

	static void Test2 ()
	{
		return; // MD shows Test method on the stack where VS does not
	}
}

class C
{
	public static void Main ()
	{
		A.Test (); // MD allows to step into Test method where VS does not
	}
}
Comment 1 Mikayla Hutchinson [MSFT] 2011-09-05 16:04:33 UTC
The first two parts could be done in MD, but the third would require runtime support.
Comment 2 Jeffrey Stedfast 2012-08-01 14:15:51 UTC
Zoltan will look into fixing the runtime to not break inside of these methods/properties/etc, while I fix MonoDevelop to not show these methods in the call stack.
Comment 3 Jeffrey Stedfast 2012-08-03 10:06:59 UTC
This is now implemented in git master and *seems* to work based on some basic testing