Bug 3217 - Debugger cannot handle #line directive
Summary: Debugger cannot handle #line directive
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: Trunk
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
Depends on:
Reported: 2012-02-03 06:28 UTC by Marek Safar
Modified: 2012-02-06 15:27 UTC (History)
2 users (show)

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:

Description Marek Safar 2012-02-03 06:28:14 UTC
class C
	public static void Main ()
		string s1 = "a";  // Try to set a breakpoint here
#line 2 "fooo"
		string o = "2";

#1: The breakpoint is not hit
#2: When the line file is not found, the user should be notified
#3: When the file is found still nothing seems to happen
#4: Most likely file checksum is not checked (didn't test this)
Comment 1 Marek Safar 2012-02-03 06:28:51 UTC
Note: tested with mono master only (requires the latest mcs)
Comment 2 Zoltan Varga 2012-02-04 06:39:59 UTC
This is party fixed now, the breakpoint is hit, and the stack trace pad shows the correct location, but md doesn't switch to 'fooo'.
Comment 3 Jeffrey Stedfast 2012-02-06 13:16:36 UTC
useful link: http://msdn.microsoft.com/en-us/library/34dk387t%28v=vs.100%29.aspx

looks like we also need to implement #line hidden
Comment 4 Mikayla Hutchinson [MSFT] 2012-02-06 14:46:43 UTC
Re. #4, AFAIK we don't have support for checking the debugger file checksums - I don't even know whether we can get them over the sdb protocol.
Comment 5 Zoltan Varga 2012-02-06 15:06:25 UTC
What are those checksums ?
Comment 6 Marek Safar 2012-02-06 15:15:36 UTC
it's MD5 checksum of source file content used during compilation
Comment 7 Marek Safar 2012-02-06 15:16:19 UTC
it's part of symbol file line entry
Comment 8 Jeffrey Stedfast 2012-02-06 15:27:06 UTC
from IRC, it sounds like the remaining issue here other than not supporting other #line directive features such as 'hidden' (which sounds like it'd need to be implemented in the runtime?), is that /home/marek/Projects/c1/c1/fooo doesn't exist and that MD should ask the user where the real location is.

oh, and we should warn if md5sums mismatch, but there are different bugs for those issues already:

bug #2853 for checking md5sums
bug #2852 for asking the user for file locations that we can't find

closing this bug unless I am missing something?