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?
Please sign in to leave a comment.
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!”
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).
Can anyone else reproduce this issue? Like I said, this occurs on all the installations here that I tested it on!
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).
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!"