Bug 6414 - Code completion fail inside #if DEBUG
Summary: Code completion fail inside #if DEBUG
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: unspecified
Hardware: Other Other
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2012-08-06 08:46 UTC by Peter Hultqvist
Modified: 2012-08-10 05:35 UTC (History)
1 user (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 Peter Hultqvist 2012-08-06 08:46:02 UTC
Code completion acts as if the current DEBUG always is undefined.
In the following code typing "Console." only initiate the correct code completion for the second(!DEBUG) condition.

#if DEBUG
            Console.WriteLine(); //Never code completes either in Debug or Release
#else
            Console.WriteLine(); //Always code completes
#endif

This behavior is the same whether I am in the Release or Debug mode.

I expected that changing to Debug mode would make the first part, in the #if DEBUG section, to code complete.


MonoDevelop 3.1.0
Installation UUID: 73a4bf08-b840-4d16-8615-5a09b9a8b2e9
Runtime:
	Mono 2.10.8.1 (Debian 2.10.8.1-1ubuntu2.2) (64-bit)
	GTK 2.24.10
	GTK# (2.12.0.0)
Build information:
	Git revision: e91815bad0d6504535a7ef4aeea1ced80239532e
	Build date: 2012-08-06 12:08:23+0000
Operating System:
	Linux
	Linux purple 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Comment 1 Mikayla Hutchinson [MSFT] 2012-08-06 11:57:17 UTC
Are you certain that the DEBUG symbol is defined in your Debug configuration?
Comment 2 Peter Hultqvist 2012-08-06 15:27:44 UTC
Yes, I updated the test code:

#if DEBUG
            Console.WriteLine("DEBUG");
#else
            Console.WriteLine("Release");
#endif

And it prints DEBUG when running.

It was written inside a newly created project so if DEBUG was not defined it would have been another bug.
Comment 3 Mike Krüger 2012-08-10 05:35:43 UTC
fixed that one.