Closed ajaybhargavb closed 3 weeks ago
@ajaybhargavb this is by design. we could change behavior for build if we want. let me talk with other people whether we want to change this behavior.
@ajaybhargavb can you give us your scenario and what you are trying to do. I will bring this to design discussion.
this is how we work currently.
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
#line 2 "Test.txt"
Console.WriteLin("Hello World!"); // Intentional typo to show error
#line default
}
}
}
we show squiggles like this
we show errors in error list like this for live error
if one double click the item, it goes to where the squiggle is.
we show errors in the error list like this for build error
if one double click the item, it goes no where.
...
duplicated item is a bug - https://github.com/dotnet/roslyn/issues/35448
but except that, other is by design.
need to decide whether we want to change design and how.
if one double click the item, it goes to where the squiggle is.
I don't understand why this is by design. Isn't the whole point of adding a line pragma is so that the diagnostics and breakpoints actually point to the file specified in the pragma?
if one double click the item, it goes no where.
Same question.
@ajaybhargavb could be. people will either lose squiggle or squiggle show up in original location but error list show mapped location but, that might be completely fine for people. squiggle won't show up since we can't currently show our squiggle in some random file we don't own.
but that is the current design. our current design could be wrong, but that is how it is now.
...
except for those bug, what it currently does is trying to move users to where it can actually fix the issue.
This went to a design review 6 May 2019. We reached the following conclusion:
Closing out as these experiences were entirely rewritten.
Version Used: VS 16.1 Preview 1
Steps to Reproduce:
dotnet new console
Main
method withTest.txt
and put some content in it.Expected Behavior: Error shows in error list. Double clicking it navigates to
Test.txt
Actual Behavior: Error shows in error list. Double clicking it navigates to
Program.cs
or does nothing. This happens on both live and build errorsNote: Putting a breakpoint in
Test.txt
and F5ing correctly hits that breakpoint. So it's not a file path issue.cc @heejaechang