Bug 6570 - Replace OldNRefactory in the debugger w/ the newer APIs
Summary: Replace OldNRefactory in the debugger w/ the newer APIs
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 3.0.x
Hardware: PC Mac OS
: Low normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2012-08-17 03:19 UTC by Marek Safar
Modified: 2013-02-15 13:30 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 Marek Safar 2012-08-17 03:19:17 UTC
MD shows variables even if variable does not exist

1. Declare local variable `foo'
2. Add following to watch window while debugging
   - foo
   - foo'''''
   - foo""""

All display value of foo but only first one should
Comment 1 Jeffrey Stedfast 2012-09-17 18:11:08 UTC
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.
Comment 2 Mike Krüger 2012-09-18 02:10:50 UTC
I don't see what this has to do with the c# parser
Comment 3 Jeffrey Stedfast 2012-09-18 10:01:49 UTC
Mike:

			StringReader codeStream = new StringReader (exp);
			IParser parser = ParserFactory.CreateParser (SupportedLanguage.CSharp, codeStream);
			Expression expObj = parser.ParseExpression ();

exp = "foo'''''"

the parser parses it as "foo"
Comment 4 Mike Krüger 2012-09-25 03:38:50 UTC
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.
Comment 5 Mike Krüger 2012-09-25 03:47:24 UTC
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)
Comment 6 Jeffrey Stedfast 2012-09-25 10:03:33 UTC
ok, then I guess let's turn this bug into "Replace OldNRefactory APIs in the debugger with the new stuff"
Comment 7 Jeffrey Stedfast 2013-02-15 13:30:05 UTC
fixed in git