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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. visual studio 2005 fails to debug c++ program, breakpoint will never be hint, program after debug always running in background, (be found in task manager->processes)

visual studio 2005 fails to debug c++ program, breakpoint will never be hint, program after debug always running in background, (be found in task manager->processes)

Scheduled Pinned Locked Moved C / C++ / MFC
csharpdebuggingc++visual-studioquestion
5 Posts 3 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.
  • B Offline
    B Offline
    blueroadside
    wrote on last edited by
    #1

    Hi, dear all, I have some trouble to debug c++ program in Visual Studio 2005, it used to work before, but since 2 weeks no more. Now the time if i want to simply debug a c++ program like hello world as stated below #include "stdafx.h" #include ; int _tmain(int argc, _TCHAR* argv[]) { std::cout << "Hello World\n"; return 0; } I set the breakpoint in std::out line, then start the debug with F5 or click the green triangle symbole, I get the hint that the programm is running in the window title of visual studio, but the breakpoint will never be hit and it looks like the program is not running at all. Then I stop the debug but after the stop debugging i can still find my program is still running in Processe of Task Manager. There is no way i can kill it. The program could be compiled and also be excuted like using Ctrl + F5 to start. I have tried another hello would program in c#, debug compile everything is fine! it seems, only c++ programm have trouble. Any idea to this? thanks, Jing

    L P 2 Replies Last reply
    0
    • B blueroadside

      Hi, dear all, I have some trouble to debug c++ program in Visual Studio 2005, it used to work before, but since 2 weeks no more. Now the time if i want to simply debug a c++ program like hello world as stated below #include "stdafx.h" #include ; int _tmain(int argc, _TCHAR* argv[]) { std::cout << "Hello World\n"; return 0; } I set the breakpoint in std::out line, then start the debug with F5 or click the green triangle symbole, I get the hint that the programm is running in the window title of visual studio, but the breakpoint will never be hit and it looks like the program is not running at all. Then I stop the debug but after the stop debugging i can still find my program is still running in Processe of Task Manager. There is no way i can kill it. The program could be compiled and also be excuted like using Ctrl + F5 to start. I have tried another hello would program in c#, debug compile everything is fine! it seems, only c++ programm have trouble. Any idea to this? thanks, Jing

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Sometimes Visual Studio gets confused, maybe because the files in your project aren't consistent. I suggest you perform a clean build, which probably includes: delteting the obj folder(s), possibly cleaning or deleting the bin folder(s), clikcing menu Build/CleanSolution, then Build/RebuildSolution. That often fixes it. If not, restart Visual. :)

      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

      Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

      B 1 Reply Last reply
      0
      • B blueroadside

        Hi, dear all, I have some trouble to debug c++ program in Visual Studio 2005, it used to work before, but since 2 weeks no more. Now the time if i want to simply debug a c++ program like hello world as stated below #include "stdafx.h" #include ; int _tmain(int argc, _TCHAR* argv[]) { std::cout << "Hello World\n"; return 0; } I set the breakpoint in std::out line, then start the debug with F5 or click the green triangle symbole, I get the hint that the programm is running in the window title of visual studio, but the breakpoint will never be hit and it looks like the program is not running at all. Then I stop the debug but after the stop debugging i can still find my program is still running in Processe of Task Manager. There is no way i can kill it. The program could be compiled and also be excuted like using Ctrl + F5 to start. I have tried another hello would program in c#, debug compile everything is fine! it seems, only c++ programm have trouble. Any idea to this? thanks, Jing

        P Offline
        P Offline
        prasad_som
        wrote on last edited by
        #3

        Check your build configuration. If it's been set to any non debug mode. It happens sometime.

        B 1 Reply Last reply
        0
        • L Luc Pattyn

          Sometimes Visual Studio gets confused, maybe because the files in your project aren't consistent. I suggest you perform a clean build, which probably includes: delteting the obj folder(s), possibly cleaning or deleting the bin folder(s), clikcing menu Build/CleanSolution, then Build/RebuildSolution. That often fixes it. If not, restart Visual. :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

          Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

          B Offline
          B Offline
          blueroadside
          wrote on last edited by
          #4

          I have tried to close vs, restart the compter, uninstall vs and reinstall it, and nothing changed! I can not debug c++ program!

          1 Reply Last reply
          0
          • P prasad_som

            Check your build configuration. If it's been set to any non debug mode. It happens sometime.

            B Offline
            B Offline
            blueroadside
            wrote on last edited by
            #5

            thanks, i have already checked every where, which should marked as debug and i also send my project to another friend, who has also vs 2005, and he can debug it in his computer, so I think, it's a weird problem, which is not so easy to resolve, maybe something in windows core is damaged, because even after I reinstall the visual studio, the problem is not solved!

            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