CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2007
    Location
    Argentina
    Posts
    579

    [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)]

  2. #2
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    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.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  3. #3
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Debugging going bad

    Use F11 instead of F8
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  4. #4
    Join Date
    Dec 2007
    Posts
    234

    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
    * I don't respond to private requests for help. It's not conducive to the general learning of others.-I also subscribe to all threads I participate, so there's no need to pm when there's an update.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help - how to remove eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to???
    * On Error Resume Next is error ignoring, not error handling(tm). * Use Offensive Programming, not Defensive Programming.
    "There is a major problem with your code, and VB wants to tell you what it is.. but you have decided to put your fingers in your ears and shout 'I'm not listening!'" - si_the_geek on using OERN
    MVP '06-'10

  5. #5
    Join Date
    Mar 2007
    Location
    Argentina
    Posts
    579

    Re: Debugging going bad

    Quote Originally Posted by S_M_A View Post
    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)]

  6. #6
    Join Date
    Mar 2007
    Location
    Argentina
    Posts
    579

    Re: Debugging going bad

    Quote Originally Posted by TechGnome View Post
    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
  •  





Click Here to Expand Forum to Full Width

Featured