VS.Net Debugging stopped working

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mikael Östberg

    #1

    VS.Net Debugging stopped working

    Hello all!

    I have been working on a project for some time now and yesterday, my
    debugger stopped working.
    It is a class library which I run from a Win32 test app, so no IIS involved
    at this point.

    I can still set breakpoints and when debugging the breakpoints get hit -
    just like it would work normally.

    However, when I want to check values of objects and such using autos or
    watch, all values are null. I can step through the code, but it seems like
    the debugger does not care about the code. It steps into catch blocks even
    though an exception would be impossible. It would even step into this
    statement:

    string test = null;
    if(test != null) {
    // it would step into here
    }

    Here is an image that proves this wierd condition:

    This example is a standard Win32 app with only one form and one button.

    I have run the repair feature in Visual Studio. I have also re-installed the
    ..Net framwork 1.1 SP1 for Win2003 but that didn't help.

    Has anyone seen this before? What could possibly had happened and more
    importantly, how can I solve this?

    Thanks!

    Mikael Östberg



  • John Bailo

    #2
    Re: VS.Net Debugging stopped working


    I've seen somewhat odd behavior when the debug symbols gets out of sync
    with the code...like if somehow you changed the output directories and
    so the debugger is reading an old set of debug symbols against newly
    compiled code.

    That's the only thing I can think of.

    Also, I assume you rebooted a few times....

    Mikael Östberg wrote:[color=blue]
    > Hello all!
    >
    > I have been working on a project for some time now and yesterday, my
    > debugger stopped working.
    > It is a class library which I run from a Win32 test app, so no IIS involved
    > at this point.
    >
    > I can still set breakpoints and when debugging the breakpoints get hit -
    > just like it would work normally.
    >
    > However, when I want to check values of objects and such using autos or
    > watch, all values are null. I can step through the code, but it seems like
    > the debugger does not care about the code. It steps into catch blocks even
    > though an exception would be impossible. It would even step into this
    > statement:
    >
    > string test = null;
    > if(test != null) {
    > // it would step into here
    > }
    >
    > Here is an image that proves this wierd condition:
    > http://www.inloop.se/temp/debugger.jpg
    > This example is a standard Win32 app with only one form and one button.
    >
    > I have run the repair feature in Visual Studio. I have also re-installed the
    > .Net framwork 1.1 SP1 for Win2003 but that didn't help.
    >
    > Has anyone seen this before? What could possibly had happened and more
    > importantly, how can I solve this?
    >
    > Thanks!
    >
    > Mikael Östberg
    >
    >
    >[/color]

    Comment

    • John Bailo

      #3
      Re: VS.Net Debugging stopped working


      Ps -- if you compile the code, and run it outside of VS.NET -- does it
      work right (assuming you put some Console.WriteLi ne() in to tell you.

      Mikael Östberg wrote:[color=blue]
      > Hello all!
      >
      > I have been working on a project for some time now and yesterday, my
      > debugger stopped working.
      > It is a class library which I run from a Win32 test app, so no IIS involved
      > at this point.
      >
      > I can still set breakpoints and when debugging the breakpoints get hit -
      > just like it would work normally.
      >
      > However, when I want to check values of objects and such using autos or
      > watch, all values are null. I can step through the code, but it seems like
      > the debugger does not care about the code. It steps into catch blocks even
      > though an exception would be impossible. It would even step into this
      > statement:
      >
      > string test = null;
      > if(test != null) {
      > // it would step into here
      > }
      >
      > Here is an image that proves this wierd condition:
      > http://www.inloop.se/temp/debugger.jpg
      > This example is a standard Win32 app with only one form and one button.
      >
      > I have run the repair feature in Visual Studio. I have also re-installed the
      > .Net framwork 1.1 SP1 for Win2003 but that didn't help.
      >
      > Has anyone seen this before? What could possibly had happened and more
      > importantly, how can I solve this?
      >
      > Thanks!
      >
      > Mikael Östberg
      >
      >
      >[/color]

      Comment

      • Mikael Östberg

        #4
        Re: VS.Net Debugging stopped working

        Thanks for your answer!

        Anyway, this example application is a 'new project' -> 'C# Windows
        Application'.

        All I did was adding a button and this example code. The output directories
        would be in order.

        I have tried to delete the pdb files, so that it would create new ones.

        I have restarted a couple of times, yes. Another thing is that I have run
        this example code on a colleague's machine and debugging works fine so it's
        definitely a machine issue (Visual Studio, .Net framework, rights, I don't
        know). My colleague and I are on the same domain and have the same user
        level, so it's not a domain policy issue.

        Thanks!

        Mikael Östberg

        The debugger output is this, if that would help:
        'WindowsApplica tion2.exe': Loaded 'C:\Documents and Settings\mikael o\My
        Documents\Visua l Studio
        Projects\Window sApplication2\b in\Debug\Window sApplication2.e xe', No native
        symbols in symbol file.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\ntdll.dll ', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\mscoree.d ll', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\kernel32. dll', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\advapi32. dll', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\rpcrt4.dl l', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\shlwapi.d ll', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\gdi32.dll ', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\user32.dl l', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\msvcrt.dl l', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\imm32.dll ', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\lpk.dll', No symbols
        loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\usp10.dll ', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \mscorwks.dll', No symbols
        loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \msvcr71.dll', Symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \fusion.dll', No symbols
        loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\ole32.dll ', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\shell32.d ll', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\Win SxS\x86_Microso ft.Windows.Comm on-Controls_6595b6 4144ccf1df_6.
        0.100.0_x-ww_8417450B\com ctl32.dll', No symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \mscordbc.dll', No symbols
        loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\clbcatq.d ll', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\oleaut32. dll', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\comres.dl l', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\version.d ll', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\Program
        Files\devTools\ NCover\CoverLib .dll', No symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\Program
        Files\devTools\ NCover\MSVCP71. dll', No symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \diasymreader.d ll', No symbols
        loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \mscorlib.dll', No symbols
        loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\ass embly\NativeIma ges1_v1.1.4322\ mscorlib\1.0.50 00.0__b77a5c561 9
        34e089_c0ad7aaa \mscorlib.dll', No symbols loaded.

        'DefaultDomain' : Loaded
        'c:\windows\mic rosoft.net\fram ework\v1.1.4322 \mscorlib.dll', No symbols
        loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \mscorsn.dll', No symbols
        loaded.

        'WindowsApplica tion2': Loaded 'C:\Documents and Settings\mikael o\My
        Documents\Visua l Studio
        Projects\Window sApplication2\b in\Debug\Window sApplication2.e xe', Symbols
        loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\ass embly\GAC\Syste m.Windows.Forms \1.0.5000.0__b7 7a5c561934e089\ S
        ystem.Windows.F orms.dll', No symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\ass embly\NativeIma ges1_v1.1.4322\ System.Windows. Forms\1.0.5000. 0
        __b77a5c561934e 089_2a8a060e\Sy stem.Windows.Fo rms.dll', No symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'c:\windows\ass embly\gac\syste m.windows.forms \1.0.5000.0__b7 7a5c561934e089\ s
        ystem.windows.f orms.dll', No symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\ass embly\GAC\Syste m\1.0.5000.0__b 77a5c561934e089 \System.dll', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\ass embly\NativeIma ges1_v1.1.4322\ System\1.0.5000 .0__b77a5c56193 4
        e089_a290f5d3\S ystem.dll', No symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'c:\windows\ass embly\gac\syste m\1.0.5000.0__b 77a5c561934e089 \system.dll', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\Mic rosoft.NET\Fram ework\v1.1.4322 \mscorjit.dll', No symbols
        loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\ass embly\GAC\Syste m.Drawing\1.0.5 000.0__b03f5f7f 11d50a3a\System .
        Drawing.dll', No symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\ass embly\NativeIma ges1_v1.1.4322\ System.Drawing\ 1.0.5000.0__b03 f
        5f7f11d50a3a_ff c7cdc8\System.D rawing.dll', No symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'c:\windows\ass embly\gac\syste m.drawing\1.0.5 000.0__b03f5f7f 11d50a3a\system .
        drawing.dll', No symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\Win SxS\x86_Microso ft.Windows.GdiP lus_6595b64144c cf1df_1.0.3790. 1
        36_x-ww_23C91158\Gdi Plus.dll', No symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\apphelp.d ll', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\MSCTFIME. IME', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\MSIMTF.dl l', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded 'C:\WINDOWS\sys tem32\MSCTF.dll ', No
        symbols loaded.

        'WindowsApplica tion2.exe': Loaded
        'C:\WINDOWS\Win SxS\x86_Microso ft.Windows.Comm on-Controls_6595b6 4144ccf1df_5.
        82.0.0_x-ww_8A69BA05\com ctl32.dll', No symbols loaded.



        "John Bailo" <jabailo@texeme .com> wrote in message
        news:4304469F.1 0201@texeme.com ...[color=blue]
        >
        > I've seen somewhat odd behavior when the debug symbols gets out of sync
        > with the code...like if somehow you changed the output directories and
        > so the debugger is reading an old set of debug symbols against newly
        > compiled code.
        >
        > That's the only thing I can think of.
        >
        > Also, I assume you rebooted a few times....
        >
        > Mikael Östberg wrote:[color=green]
        > > Hello all!
        > >
        > > I have been working on a project for some time now and yesterday, my
        > > debugger stopped working.
        > > It is a class library which I run from a Win32 test app, so no IIS[/color][/color]
        involved[color=blue][color=green]
        > > at this point.
        > >
        > > I can still set breakpoints and when debugging the breakpoints get hit -
        > > just like it would work normally.
        > >
        > > However, when I want to check values of objects and such using autos or
        > > watch, all values are null. I can step through the code, but it seems[/color][/color]
        like[color=blue][color=green]
        > > the debugger does not care about the code. It steps into catch blocks[/color][/color]
        even[color=blue][color=green]
        > > though an exception would be impossible. It would even step into this
        > > statement:
        > >
        > > string test = null;
        > > if(test != null) {
        > > // it would step into here
        > > }
        > >
        > > Here is an image that proves this wierd condition:
        > > http://www.inloop.se/temp/debugger.jpg
        > > This example is a standard Win32 app with only one form and one button.
        > >
        > > I have run the repair feature in Visual Studio. I have also re-installed[/color][/color]
        the[color=blue][color=green]
        > > .Net framwork 1.1 SP1 for Win2003 but that didn't help.
        > >
        > > Has anyone seen this before? What could possibly had happened and more
        > > importantly, how can I solve this?
        > >
        > > Thanks!
        > >
        > > Mikael Östberg
        > >
        > >
        > >[/color][/color]


        Comment

        • Mikael Östberg

          #5
          Re: VS.Net Debugging stopped working

          Yes, when I just run the code in non debug mode it works fine which would
          mean that it's the debugger that is failing for some reason.

          ::m

          "John Bailo" <jabailo@texeme .com> wrote in message
          news:4304475A.9 030601@texeme.c om...[color=blue]
          >
          > Ps -- if you compile the code, and run it outside of VS.NET -- does it
          > work right (assuming you put some Console.WriteLi ne() in to tell you.
          >
          > Mikael Östberg wrote:[color=green]
          > > Hello all!
          > >
          > > I have been working on a project for some time now and yesterday, my
          > > debugger stopped working.
          > > It is a class library which I run from a Win32 test app, so no IIS[/color][/color]
          involved[color=blue][color=green]
          > > at this point.
          > >
          > > I can still set breakpoints and when debugging the breakpoints get hit -
          > > just like it would work normally.
          > >
          > > However, when I want to check values of objects and such using autos or
          > > watch, all values are null. I can step through the code, but it seems[/color][/color]
          like[color=blue][color=green]
          > > the debugger does not care about the code. It steps into catch blocks[/color][/color]
          even[color=blue][color=green]
          > > though an exception would be impossible. It would even step into this
          > > statement:
          > >
          > > string test = null;
          > > if(test != null) {
          > > // it would step into here
          > > }
          > >
          > > Here is an image that proves this wierd condition:
          > > http://www.inloop.se/temp/debugger.jpg
          > > This example is a standard Win32 app with only one form and one button.
          > >
          > > I have run the repair feature in Visual Studio. I have also re-installed[/color][/color]
          the[color=blue][color=green]
          > > .Net framwork 1.1 SP1 for Win2003 but that didn't help.
          > >
          > > Has anyone seen this before? What could possibly had happened and more
          > > importantly, how can I solve this?
          > >
          > > Thanks!
          > >
          > > Mikael Östberg
          > >
          > >
          > >[/color][/color]


          Comment

          • Mikael Östberg

            #6
            Re: VS.Net Debugging stopped working

            Hello again!

            I tried to debug an old ASP.NET project and there it works fine.

            This narrows this wierd issue down to Win32 apps.

            Clues anyone..?

            ::m


            "Mikael Östberg" <mikael.ostbe rg-at-intellecta.se> wrote in message
            news:#wcst08oFH A.420@TK2MSFTNG P09.phx.gbl...[color=blue]
            > Hello all!
            >
            > I have been working on a project for some time now and yesterday, my
            > debugger stopped working.
            > It is a class library which I run from a Win32 test app, so no IIS[/color]
            involved[color=blue]
            > at this point.
            >
            > I can still set breakpoints and when debugging the breakpoints get hit -
            > just like it would work normally.
            >
            > However, when I want to check values of objects and such using autos or
            > watch, all values are null. I can step through the code, but it seems like
            > the debugger does not care about the code. It steps into catch blocks even
            > though an exception would be impossible. It would even step into this
            > statement:
            >
            > string test = null;
            > if(test != null) {
            > // it would step into here
            > }
            >
            > Here is an image that proves this wierd condition:
            > http://www.inloop.se/temp/debugger.jpg
            > This example is a standard Win32 app with only one form and one button.
            >
            > I have run the repair feature in Visual Studio. I have also re-installed[/color]
            the[color=blue]
            > .Net framwork 1.1 SP1 for Win2003 but that didn't help.
            >
            > Has anyone seen this before? What could possibly had happened and more
            > importantly, how can I solve this?
            >
            > Thanks!
            >
            > Mikael Östberg
            >
            >
            >[/color]


            Comment

            • John Bailo

              #7
              Re: VS.Net Debugging stopped working



              You say this is a class library -- a dll?

              Maybe you're in dll hell -- that is, a dll has been registered with the
              GAC or with the registry and it's not being released/overwritten by your
              new code.

              Have you tried writing a completely new app, with a new name in a new
              directory?


              Mikael Östberg wrote:[color=blue]
              > Hello again!
              >
              > I tried to debug an old ASP.NET project and there it works fine.
              >
              > This narrows this wierd issue down to Win32 apps.
              >
              > Clues anyone..?
              >
              > ::m
              >
              >
              > "Mikael Östberg" <mikael.ostbe rg-at-intellecta.se> wrote in message
              > news:#wcst08oFH A.420@TK2MSFTNG P09.phx.gbl...
              >[color=green]
              >>Hello all!
              >>
              >>I have been working on a project for some time now and yesterday, my
              >>debugger stopped working.
              >>It is a class library which I run from a Win32 test app, so no IIS[/color]
              >
              > involved
              >[color=green]
              >>at this point.
              >>
              >>I can still set breakpoints and when debugging the breakpoints get hit -
              >>just like it would work normally.
              >>
              >>However, when I want to check values of objects and such using autos or
              >>watch, all values are null. I can step through the code, but it seems like
              >>the debugger does not care about the code. It steps into catch blocks even
              >>though an exception would be impossible. It would even step into this
              >>statement:
              >>
              >>string test = null;
              >>if(test != null) {
              >> // it would step into here
              >>}
              >>
              >>Here is an image that proves this wierd condition:
              >>http://www.inloop.se/temp/debugger.jpg
              >>This example is a standard Win32 app with only one form and one button.
              >>
              >>I have run the repair feature in Visual Studio. I have also re-installed[/color]
              >
              > the
              >[color=green]
              >>.Net framwork 1.1 SP1 for Win2003 but that didn't help.
              >>
              >>Has anyone seen this before? What could possibly had happened and more
              >>importantly , how can I solve this?
              >>
              >>Thanks!
              >>
              >>Mikael Östberg
              >>
              >>
              >>[/color]
              >
              >
              >[/color]

              Comment

              • Mikael Östberg

                #8
                Re: VS.Net Debugging stopped working

                Well..

                In my efforts to solve this, I started a completely new project which
                consists only of a C# Windows Application through the New Prjoct Wizard.

                Even then, this problem occurs.

                In the debug output window, I can see that the symbols for my application
                are loaded.

                So no, I'm not in DLL hell..

                ::m

                "John Bailo" <jabailo@texeme .com> wrote in message
                news:4304BEF1.4 050504@texeme.c om...[color=blue]
                >
                >
                > You say this is a class library -- a dll?
                >
                > Maybe you're in dll hell -- that is, a dll has been registered with the
                > GAC or with the registry and it's not being released/overwritten by your
                > new code.
                >
                > Have you tried writing a completely new app, with a new name in a new
                > directory?
                >
                >
                > Mikael Östberg wrote:[color=green]
                > > Hello again!
                > >
                > > I tried to debug an old ASP.NET project and there it works fine.
                > >
                > > This narrows this wierd issue down to Win32 apps.
                > >
                > > Clues anyone..?
                > >
                > > ::m
                > >
                > >
                > > "Mikael Östberg" <mikael.ostbe rg-at-intellecta.se> wrote in message
                > > news:#wcst08oFH A.420@TK2MSFTNG P09.phx.gbl...
                > >[color=darkred]
                > >>Hello all!
                > >>
                > >>I have been working on a project for some time now and yesterday, my
                > >>debugger stopped working.
                > >>It is a class library which I run from a Win32 test app, so no IIS[/color]
                > >
                > > involved
                > >[color=darkred]
                > >>at this point.
                > >>
                > >>I can still set breakpoints and when debugging the breakpoints get hit -
                > >>just like it would work normally.
                > >>
                > >>However, when I want to check values of objects and such using autos or
                > >>watch, all values are null. I can step through the code, but it seems[/color][/color][/color]
                like[color=blue][color=green][color=darkred]
                > >>the debugger does not care about the code. It steps into catch blocks[/color][/color][/color]
                even[color=blue][color=green][color=darkred]
                > >>though an exception would be impossible. It would even step into this
                > >>statement:
                > >>
                > >>string test = null;
                > >>if(test != null) {
                > >> // it would step into here
                > >>}
                > >>
                > >>Here is an image that proves this wierd condition:
                > >>http://www.inloop.se/temp/debugger.jpg
                > >>This example is a standard Win32 app with only one form and one button.
                > >>
                > >>I have run the repair feature in Visual Studio. I have also re-installed[/color]
                > >
                > > the
                > >[color=darkred]
                > >>.Net framwork 1.1 SP1 for Win2003 but that didn't help.
                > >>
                > >>Has anyone seen this before? What could possibly had happened and more
                > >>importantly , how can I solve this?
                > >>
                > >>Thanks!
                > >>
                > >>Mikael Östberg
                > >>
                > >>
                > >>[/color]
                > >
                > >
                > >[/color][/color]


                Comment

                Working...