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)
-
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
-
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
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.
-
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
Check your build configuration. If it's been set to any non debug mode. It happens sometime.
-
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.
I have tried to close vs, restart the compter, uninstall vs and reinstall it, and nothing changed! I can not debug c++ program!
-
Check your build configuration. If it's been set to any non debug mode. It happens sometime.
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!