Breakpoint shifted when file gets updated - visual-studio-2005

I am using visual studio 2005 for my windows application developed in C#.
I have kept few breakpoints in the class,when i update the svn,these breakpoints get shifted(Actually remain in same line no and not in the method where it is intended to).Is there a way we can update the break point as well?

Breakpoints are stored in your suo file and that file is not human readable. There is no way to change this.

Related

F# double click on file creates a copy in VS

If I double click on a source file in Visual Studio F# project and accidentally slightly move the mouse even a tiny bit down (a few pixels suffice), then VS "renames" the file into a copy.
For example file SomeSource.fs becomes Copy of SomeSource.fs. The original file at that point "disappears" and the copy is added at the end of the project. The issue happens on all computers that I use and only in F# but not in C#.
It seems that there should some setting in VS, which tells it to do that. How to disable that thing?
Thanks.
Seems bug to me. Created just bug report: https://developercommunity.visualstudio.com/content/problem/327630/f-file-drag-in-solution-explorer-cause-file-being.html.
Hopefully, we get it to fix soon.
Btw Visual Studio has very nice bug report feature integrated: upper right corner => send feedback => report problem.

Visual Studio 2013 breakpoints only work with explicit save

In Visual Studio 2013 Ultimate, if I edit my C# file (ASP.NET project) and then press F5, without explicitly saving, breakpoints are not hit. They are shown at runtime as empty red circles.
If I save, then press F5, they work as expected.
Even though saving before build is happening, I assume for some reason the debugging is happening against an older assembly? Holding the pointer over the empty circle reports "The breakpoint will not be hit. Source code is different from original version... to allow this disable the option 'Require source files to exactly match'"
I have tried resetting all my options to the defaults, but it still happens.
To exhibit this behavior, the edit seems to require a code change, not just adding a comment.
Tried all these but nothing works: "The breakpoint will not currently be hit. The source code is different from the original version." What does this mean?
Possible klunky fix:
However, I have experimentally added a post-build event, calling a small exe that does Thread.Sleep(5000). This seems to fix the problem!
So is my PC just too damn fast?!
I discussed this with MS, and they suggested the following on the command line
devenv /resetuserdata
This has fixed my problems. Don't forget to save your VS settings first, if you want keep them.

Visual studio does not load class into editor if you check it out while debugging the solution

We are using Visual Studio 2010 with Team Foundation server 2010 for source control. Our VB solution has several projects. (one EXE and a few DLLs).
Here is the issue:
1) Programmer A makes a change to a VB class and checks it in.
2) Programmer B, who is debugging the application, goes to that class in the editor and checks it out.
Immediately he gets a message saying that "Your action caused a check out of the file(s) such and such, and a new version from source control has been loaded in the development environment." When you say OK, every line in the class is underlined with a tooltip "Unable to apply this change while debugging"
So he stops debugging.
3) The change that the programmer A has made was checked out and is on disk but is not loaded into the editor. So if Programmer B alters the file and checks it in, the changes that Programmer A made are lost.
4) This does not happen if the solution is paused. Also if you close the class.vb and reopen it, it retrives the new one from disk.
We have lost several code changes because people check out recently updated code while debugging.
Any adeas as to how to make it work properly, that is how we can get the newly checked out source code to load in the editor when the program is debugging
Thanks,
Stephen Simpson

Visual Studio Annotate changing line number in view

I'm using Visual Studio 2010 with VB.NET, in a 4.0 project, with Team Foundation Server. When I annotate, not only do I not see line numbers (which is apparently an unfixed bug with VS 2010 - http://connect.microsoft.com/VisualStudio/feedback/details/553557/when-invoking-tfs-annotate-in-visual-studio-there-are-no-line-numbers-shown) but annotate also advances the screen 10-15 lines, which makes it difficult to find the code I was actually attempting to Annotate.
Has anyone run into this before? Any chance you've figured out a fix for it? Even knowing I'm not alone would be nice.
I've run into this also, but keep in mind the following:
If you Annotate from Solution Explorer, it'll start you at the top of the file.
If you Annotate from the file with the right-click menu, it'll start from where your cursor is located when you go to annotate.
If you Annotate from the file with the File -> Source Control -> Annotate, it'll start from the top of the file again.
To find particular code that I want annotated I do one of two things:
Annotate with the right-click menu on the line of interest. Close the file when I'm done, and repeat as necessary.
Liberal use of Ctrl+F
Hopefully, the VS team will fix this next time around.
Late to the party for VS 2010 but according to the documentation (and it does work) you can also hover over the annotations and it lists the line numbers the annotation covers.
https://msdn.microsoft.com/en-us/library/bb385979(v=vs.100).aspx

Microsoft visual studio screen problem

I am having a problem thats not about the code, it's about the screen in Microsoft visual studio 2008.
Actually problem is i created one utility from couple of weeks i didn't opened that utility today i opened (in Microsoft visual studio the screen appearing blank no controls are visible in that.But all the controls properties are there. I tried a lot but i didn't get solution. Last when the same thing happened i created the controls again. Now i don't want to go to create all the controls again. If any one have the solution please help me.
Before screen is like this:
Now its blank (like new page)
From your description I'm not sure if this is a application/code build issue or an IDE issue, what you could try is to reset the settings in visual studio and see if this helps.
You can do this by going to Tools -> Import/Export settings and then following the wizard to reset the settings, you may also want to perform a backup before resetting them (this is also part of the wizard) then they can be restored if this causes you further issues.
I don't have a copy of 2008 available at the moment so some menu entries may be slightly named different.
Hope this helps!
EDIT:
Now there is more information, this looks like there may be a problem with the code in the
InitializeComponent
method of the form.designer file (e.g. if you are using c# this would be something like Form1.Designer.cs and can be found by expanding the corresponding form in the solution explorer), if you remove/comment the lines that say
this.Controls.Add(this.NameOfControl)
(NameOfControl is where you would see your declared controls name)
then you get the behaviour that you are seeing, the controls do not render as they are never added to the forms controls collection but as they are declared you will still see them in the properties drop down and wont be able to add another control with the same name.

Resources