Bug: Code completion not working inside #if DEBUG block

The code completion does not work for me when I'm typing inside a #if DEBUG block (even if the DEBUG configuration is currently selected in Visual Studio).

Consider this code:

using System;

namespace Demo
{
    class Program
    {
        static void Main()
        {

#if DEBUG
        Test.One;  // <- [A] When typing the '.', the list of members is not shown.
#endif
        Test.One;  // <- [B] When typing the '.', the list of members IS shown.
        }

        public enum Test
        {
            One,
            Two
        }
    }
}

I have all the completion stuff turned on in Resharper options (Intellisense, Completion Behavior)
If I position the cursor just after "Test" in line [A] and press ".", nothing happens.
If I position the cursor just after "Test" in line [B] and press ".", I get the list of enum members, as expected.

Does anyone else have this problem?

5 comments
Comment actions Permalink

Hello,

Is the code under DEBUG greyed out? Would it be if you change it to !DEBUG?


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0
Comment actions Permalink

The code is not greyed out (since I have the DEBUG build selected in the IDE). If I change to RELEASE build, the code does become greyed out.
Incidentally, I have reproduced this error on the 3 other Resharper installations I've tested it with (on my work colleagues' PCs).

0
Comment actions Permalink

Can anyone else reproduce this issue? Like I said, this occurs on all the installations here that I tested it on!

0
Comment actions Permalink

Yepp same behavior here (5.1.1708).

*Edit: However in Case A the members are shown when I use Ctrl+Space, but not, as you've stated, automatically when using "." (as it does in case B).

0
Comment actions Permalink

Hello Matthew,

This bug is logged as http://youtrack.jetbrains.net/issue/RSRP-179548 in
our tracker. Thank you!

Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Can anyone else reproduce this issue? Like I said, this occurs on all
the installations here that I tested it on!

---
Original message URL:
http://www.jetbrains.net/devnet/message/5265698#5265698



0

Please sign in to leave a comment.