Hey,
Recently I had a look at the 'Debugging' options in Visual Studio 2008 and I think I may have changed some settings without realizing it.
Every time an error occurs, instead of highlighting the line with the error, VS now shows me the source code that actually throws the exception...
Example... I was trying to iterate through some files in a folder in which I (apparently) had no authorization.
When I call this code on a particular folder, it eventually reaches a folder with limited authorization. Instead of showing me where the error occured however, I get to see this source code, in the file '__Error.cs':vb.net Code:
For Each dir As DirectoryInfo In parentDir.GetDirectories() Dim n As New TreeNode(dir.Name) n.Tag = dir parentNode.Nodes.Add(n) 'Recursive call Me.GetFolders(dir, n) Next
Now, the last line (of this example) is highlighted and the exception is shown there...csharp Code:
case Win32Native.ERROR_ACCESS_DENIED: if (str.Length == 0) throw new UnauthorizedAccessException(Environment.GetResourceString("UnauthorizedAccess_IODenied_NoPathName")); else throw new UnauthorizedAccessException(String.Format(CultureInfo.CurrentCulture, Environment.GetResourceString("UnauthorizedAccess_IODenied_Path"), str));
Now... This is very interesting and all, but it's rather annoying, because now I can't see on which line the error occurs exactly... In this example it's obvious, but in other cases it might not be and it becomes hard to pinpoint the location of the error...
How can I disable this? I'm sure it must be some setting, but I cannot find the one...
I saw one called 'Enable .NET Framework source stepping' was checked, and I assumed that was the one. But now I've unchecked it, and it's still doing this.
I also unchecked 'Enable address-level debugging' as that seemed a likely cause... Still, no luck.
Anyone happen to know what I did and how I can fix it?![]()



Reply With Quote


