-
May 12th, 2010, 11:15 AM
#1
[RESOLVED] Debugging going bad
I had a similar problem in the past:
Suddenly, my code started executing wrongly, so I started step by step debugging of the offending routine (which before worked perfectly ).
The strange thing is that the step by step debugging (pressing F8), just jumps over two lines of code. They are non executed, and the highlighted yellow bar just jumps to the third line.
It does similar things when the code is not compiled, and the debugger runs an older compiled executable, so the compiled code does not match the code.
This started one day in which a non graphic class started to no more being displayed, and instead appeared the same message that appears when a form is wrongly hand-edited, and cannot be displayed.
I had a similar problem in the past, and it was solved by deleting a file, but I don’t remember what file, and cannot recover the post (not even the forum), in which I was advised to delete the file.
I deleted the entire bin directory, and rebuild the entire solution, but it does not works.
Somebody can give me a clue?
I are running visual Studio 2008, in windows 7 64 bit, compiling for Any CPU.
[Vb.NET 2008 (ex Express)]
-
May 13th, 2010, 09:21 AM
#2
Re: Debugging going bad
Try closing the IDE and delete all files that can be recreated, i.e. all files in output dirs such as obj, debug and so on. Set explorer to show hidden files by the way. All hidden files should be deletable but to be on the safe side make full copy before deleting anything.
-
May 13th, 2010, 12:20 PM
#3
-
May 13th, 2010, 01:43 PM
#4
Re: Debugging going bad
I had the samething happen to me the other night... cleared out all the folders, rebuilt the app, and yes, I used F10/11 .... and it still skipped over two lines... oddly they were both diagnostic.debug.writeline lines... so it wasn't detrimental to the operation of my app, but I still would have liked to have know what the values were (turns out in the end it was moot as the problem was somewhere else, has since been fixed and the non-running lines have been deleted.) ... anyways, never did figure out what the problem was.
-tg
-
May 13th, 2010, 06:25 PM
#5
Re: Debugging going bad
Originally Posted by S_M_A
Try closing the IDE and delete all files that can be recreated, i.e. all files in output dirs such as obj, debug and so on. Set explorer to show hidden files by the way. All hidden files should be deletable but to be on the safe side make full copy before deleting anything.
Yes, deleting the obj directory (at the same time that bin folder) worked.
I don't remember the specific file that i mentioned, but I think thas was the pdb file.
the class that failed to show in text, as if where a form, was caused because I made two vb files (in different directories), with the same name. One of the files was an user control, and the other file contained an independent class, but it seems that VS tougth that it was part of the user control.
Renaming the non user control file to another name, allowed to see his text.
I think that is a bug, but not sure. ¿Should I report it in Connect, or is a by design feature?
[Vb.NET 2008 (ex Express)]
-
May 13th, 2010, 06:27 PM
#6
Re: Debugging going bad
Originally Posted by TechGnome
I had the samething happen to me the other night... cleared out all the folders, rebuilt the app, and yes, I used F10/11 .... and it still skipped over two lines... oddly they were both diagnostic.debug.writeline lines... so it wasn't detrimental to the operation of my app, but I still would have liked to have know what the values were (turns out in the end it was moot as the problem was somewhere else, has since been fixed and the non-running lines have been deleted.) ... anyways, never did figure out what the problem was.
-tg
Check also that you are not runnig a release binary instead of a debug.
[Vb.NET 2008 (ex Express)]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|