Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
MD shows variables even if variable does not exist
1. Declare local variable `foo'
2. Add following to watch window while debugging
All display value of foo but only first one should
the C# parser that we use apparently strips off the garbage at the end... the parsed expression tree does not contain them.
Reassigning to Mike.
I don't see what this has to do with the c# parser
StringReader codeStream = new StringReader (exp);
IParser parser = ParserFactory.CreateParser (SupportedLanguage.CSharp, codeStream);
Expression expObj = parser.ParseExpression ();
exp = "foo'''''"
the parser parses it as "foo"
Then simply don't do it - if you use the parser there then foo is the best thing that it can make out of this.
btw. I really recommend using the new nrefactory in the debugger - it still uses a very outdated one.
With the new nr5:
new CSharpParser ().ParseExpression("foo") returns 'Foo'
and new CSharpParser ().ParseExpression("foo'''") returns Null
- NR5 isn't that gently anymore and detects errors. (The old one best-fits and always tries to give something valid back - even on invalid inputs)
ok, then I guess let's turn this bug into "Replace OldNRefactory APIs in the debugger with the new stuff"
fixed in git