Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Project settings

Project settings

Scheduled Pinned Locked Moved C / C++ / MFC
debuggingcsharpvisual-studiohelpquestion
9 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    adonisv
    wrote on last edited by
    #1

    I'm using visual studio 6.0 and I've been tweaking the project settings on my project. However, now I can't run the debugger. Everytime I try to set a breakpoint I get a message saying the break point cannot be set and so it will be disabled and debugging will start at the beginning of the program. Any ideas? X| Under project settings, under the Link tab, I do have "Generate debug info" checked. I was previously getting an error saying this project contained no debug information. Now I can't set a break point. I must be missing something. A clue? Yes, that's it! :confused:

    C 1 Reply Last reply
    0
    • A adonisv

      I'm using visual studio 6.0 and I've been tweaking the project settings on my project. However, now I can't run the debugger. Everytime I try to set a breakpoint I get a message saying the break point cannot be set and so it will be disabled and debugging will start at the beginning of the program. Any ideas? X| Under project settings, under the Link tab, I do have "Generate debug info" checked. I was previously getting an error saying this project contained no debug information. Now I can't set a break point. I must be missing something. A clue? Yes, that's it! :confused:

      C Offline
      C Offline
      Carlos Antollini
      wrote on last edited by
      #2

      Your current setting is in debug mode? May be you are in release mode... Try to recompile all the project.... Best Regards Carlos Antollini Do you know piFive[^] ?

      A 1 Reply Last reply
      0
      • C Carlos Antollini

        Your current setting is in debug mode? May be you are in release mode... Try to recompile all the project.... Best Regards Carlos Antollini Do you know piFive[^] ?

        A Offline
        A Offline
        adonisv
        wrote on last edited by
        #3

        Debugging in Release Mode I've heard a myth repeated many times by my fellow VC++ developers. It is that it is not possible to debug in Release Mode. Fortunately, this is a myth. Rule 7: When all else fails try debugging in release mode. It is possible to debug in Release mode. The first step is to turn on symbols: * In Project Settings (Alt-F2) under the "C++/C tab" set the category to "General" and change the Debug Info setting to "Program Database". * Under the "Link tab" check the "Generate Debug Info" tab. * Recompile using "Rebuild All" This will allow you to see the symbols in the release version. You might want to also consider the following: * You may want disable your optimization settings when debugging your release version (though this isn't absolutely necessary). * If you have trouble placing breakpoints, the command "__asm {int 3}" will cause your program to stop at that line (be sure to remove these lines from your program when you are done debugging). That worked! :-D

        P M 2 Replies Last reply
        0
        • A adonisv

          Debugging in Release Mode I've heard a myth repeated many times by my fellow VC++ developers. It is that it is not possible to debug in Release Mode. Fortunately, this is a myth. Rule 7: When all else fails try debugging in release mode. It is possible to debug in Release mode. The first step is to turn on symbols: * In Project Settings (Alt-F2) under the "C++/C tab" set the category to "General" and change the Debug Info setting to "Program Database". * Under the "Link tab" check the "Generate Debug Info" tab. * Recompile using "Rebuild All" This will allow you to see the symbols in the release version. You might want to also consider the following: * You may want disable your optimization settings when debugging your release version (though this isn't absolutely necessary). * If you have trouble placing breakpoints, the command "__asm {int 3}" will cause your program to stop at that line (be sure to remove these lines from your program when you are done debugging). That worked! :-D

          P Offline
          P Offline
          Prakash Nadar
          wrote on last edited by
          #4

          The difference between release mode and debug mode is the Debug info in your code and the type of libs liked, when you turn on those options, you have effectivly turned the Release mode build to debug mode build


          Tech.Support : Mam, is your pc running under windows? Customer : No actually its close to the main door.

          S 1 Reply Last reply
          0
          • P Prakash Nadar

            The difference between release mode and debug mode is the Debug info in your code and the type of libs liked, when you turn on those options, you have effectivly turned the Release mode build to debug mode build


            Tech.Support : Mam, is your pc running under windows? Customer : No actually its close to the main door.

            S Offline
            S Offline
            Steve S
            wrote on last edited by
            #5

            But you can have a release build which is optimised, links to the non-debug versions of various libs/dlls and still contains debug info. Of course, the info is of more limited use, since the compiler may well have reordered parts of the object code. Steve S

            A 1 Reply Last reply
            0
            • A adonisv

              Debugging in Release Mode I've heard a myth repeated many times by my fellow VC++ developers. It is that it is not possible to debug in Release Mode. Fortunately, this is a myth. Rule 7: When all else fails try debugging in release mode. It is possible to debug in Release mode. The first step is to turn on symbols: * In Project Settings (Alt-F2) under the "C++/C tab" set the category to "General" and change the Debug Info setting to "Program Database". * Under the "Link tab" check the "Generate Debug Info" tab. * Recompile using "Rebuild All" This will allow you to see the symbols in the release version. You might want to also consider the following: * You may want disable your optimization settings when debugging your release version (though this isn't absolutely necessary). * If you have trouble placing breakpoints, the command "__asm {int 3}" will cause your program to stop at that line (be sure to remove these lines from your program when you are done debugging). That worked! :-D

              M Offline
              M Offline
              Mike Dimmick
              wrote on last edited by
              #6

              John Robbins (of MSDN Magazine's Bugslayer column) recommends always compiling your release builds with debugging information turned on. You just don't distribute your debugging symbols to the end customer. Enabling the /DEBUG switch to the linker causes it to go a little pessimistic and include everything from all libraries. For a release build, you'll probably want to turn /OPT:REF on, which tells it to only include referenced blocks. In combination with the /Gy compiler switch, this causes any unreferenced code and data to be eliminated, reducing the size of your executable. If your program crashes, you can now use tools like CrashFinder[^] (look about half-way down the page) to turn the crash address into a source file and line number.

              1 Reply Last reply
              0
              • S Steve S

                But you can have a release build which is optimised, links to the non-debug versions of various libs/dlls and still contains debug info. Of course, the info is of more limited use, since the compiler may well have reordered parts of the object code. Steve S

                A Offline
                A Offline
                adonisv
                wrote on last edited by
                #7

                I'm trying to switch my project back to Debug mode, but it won't run under those settings. I've got the project settings to Win32 Debug and I've got the project configurations set to Win32 Debug. What else do I need? :confused:

                S 1 Reply Last reply
                0
                • A adonisv

                  I'm trying to switch my project back to Debug mode, but it won't run under those settings. I've got the project settings to Win32 Debug and I've got the project configurations set to Win32 Debug. What else do I need? :confused:

                  S Offline
                  S Offline
                  Steve S
                  wrote on last edited by
                  #8

                  That should be enough. When you say it won't run, what does that mean, exactly? Won't compile, won't execute under debugger, or what? Steve S

                  A 1 Reply Last reply
                  0
                  • S Steve S

                    That should be enough. When you say it won't run, what does that mean, exactly? Won't compile, won't execute under debugger, or what? Steve S

                    A Offline
                    A Offline
                    adonisv
                    wrote on last edited by
                    #9

                    I get a debug assertion failed error message. :sigh: The debugger then points to this section of the "windows" code when I try to debug the problem... void CWnd::MoveWindow(int x, int y, int nWidth, int nHeight, BOOL bRepaint) { ASSERT(::IsWindow(m_hWnd)); if (m_pCtrlSite == NULL) ::MoveWindow(m_hWnd, x, y, nWidth, nHeight, bRepaint); else m_pCtrlSite->MoveWindow(x, y, nWidth, nHeight, bRepaint); } :((

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups