VS 2008 C++ Debugger works only once - c++

After a Windows update yesterday, I've run into a terrible problem. The debugger suddenly is creating issues.
When I bring up Visual Studio from the start menu, the debugger appears to start, but there is no console window and nothing happens for a long time.
But, if I start it from the VS command prompt, it works, but only once. This is become a nasty issue, and any help/pointers are highly appreciated.
Note: This problem happens with all the C++ projects on my system.

A quick work around would be to start without debugging, ctrl + F5 I believe. If the same thing keeps happening it will be easier to pinpoint what is wrong. Also additional information about what is not working would be helpful.

Related

Visual studio heap profiling not working anymore

I used Visual Studio profiling on vs2015, and for a few times it worked great, I could see all allocations, call stack, etc. After a couple of days it stopped working, I could take snapshots but when clicking on one of the entries it only showed "Analyzing heap details..." at the bottom but nothing appeared. I installed vs2017 to check and the same happened! It worked for a few days but now it's stuck again. There must be something wrong that I'm doing, but I don't have any ideas what it could be, anyone had the same issue, and discovered the reasons for this and how to solve it? Thanks!
PS: I'm on the same project when using vs2017, and the compiler is still 2015, I cannot change that at the moment.
​Cool, disabling and re-enabling the heap profiler solves this.

Console Window does not appear using Dev C++

When I compile and run my code, the console window no longer shows up.
(I have "system("pause");" included, this is not the issue).
I was trying to debug a program in Dev C++ and must have changed some settings. Any advice?
Dev-C++ is really old and the debugger is full of bugs. If you're sure the problem isn't with your code, then I'm assuming you've tried the basics, like restarting Dev-C++ and restarting the computer?
If that doesn't work, try reinstalling Dev-C++... It only takes a couple seconds to install it.
You can also try stepping the code.

Unable to start UE4Editor.exe

Trying to launch the editor from Visual Studio 2013 Ultimate I get the following error in the title. VS says it's because it can't reach MSVSMON.EXE on a "remote computer", the weird thing is that I'm not trying to debug on a remote computer, but rather, on my own. My firewall is ZoneAlarm if that makes any difference.
Any help?
Edit: I've set all in and outbound communication to and from both unreal and visual studio in my firewall to "allowed", yet for some reason it still won't let me debug...
Edit 2: Disabling the firewall entirely does nothing at all.. The error persists
Edit 3: Uninstalling ZA altogether seems to fix the issue
Just a note, so far you've been chasing the wrong problem and have not yet gathered enough relevant facts. The dialog is very unhelpful, this does not have anything to do with a "remote computer".
Msvsmon.exe is used in this scenario because UE4Editor.exe is a 64-bit process. Visual Studio cannot use its built-in debugger, it is a 32-bit process. Debugging a 64-bit process with a 32-bit debugger is not possible. So it has a workaround, it uses the 64-bit remote debugger, C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Remote Debugger\x64\msvsmon.exe. Basically works the same has remote debugging on another machine, except it doesn't use the network to connect to the debugger.
So your firewall settings and the considerable amount of trouble-shooting info about remote debugging you can find on the web or MSDN just does not apply in your case at all. You've been chasing the wrong problem.
Having an issue with msvsmon.exe when debugging 64-bit code is quite unusual, never heard of anybody having trouble with it before. You want to do a basic smoke test to check if it is really a problem with msvsmon.exe or it is actually UE4Editor.exe that puts up a fight.
Create a little do-nothing C# console mode app, just Console.ReadLine() in the Main() method. Project + Properties, Build tab, untick the "Prefer 32-bit" option. This ensures it runs as a 64-bit process. Press F5. If all is well then it starts running and you'll see msvsmon.exe in the Task Manager, Processes tab.
If that does not work either then something is interfering with the process interop between Visual Studio and msvsmon.exe. Usually anti-malware related, disable that first. Next thing to try is to start killing processes one-by-one with Task Manager to find the evil-doer. If debugging the C# app works okay then you have a good reason to visit the UE4 forum to find help.
Update your question with what you've learned.
Uninstall Zone Alarm and everything will be OK.

MS Visual C++ 2010 Express keeps running old code

I'm using MS Visual C++ 2010 Express. When I want to run a program, it only works the first time. With this I mean that after I run it for the first time, and change my code all together and then try to run it again, it just keeps running my old code. How can I prevent this from happening?
p.s. - I use 'Build Solution' after I'm done with my new code but it still happens
Figure I might as well make it an actual answer:
If you clock is tempered (#anhoppe) then that could cause a problem, and it could also be something to do with your debugging cache. I recommend research in that. One place to look could be this: How to reset the VisualStudio (VS2010, VS2012) debugger cache?
And finally, seemingly obvious, try the "Rebuild Solution" (#Kevin) if you haven't already.

My C++ executable runs way faster outside the Visual Studio 2008 IDE than inside, even in release

I build a C++ application that does some number crunching.
I'm running in Visual Studio 2008 PRO SP1, in release mode, Windows 7 64 bit.
If I run it inside the IDE, the application takes 4 minutes, if I run the same executable from windows explorer it takes 6 seconds!
I have no clue. I have checked that this does not depend on the processor and operating system. I don't think I have strange VS plugins that are doing something in the background.
Any hints?
Thank you in advance!
Marco
Presumably, the slow down is caused by the debugger being attached when you are starting the application in Visual Studio. This is the case even when you've built the program in "Release" mode.
To confirm that this is indeed the source of your problem, try running your application without the debugger, using the "Start Without Debugging" command or Ctrl+F5.
It's worth nothing that in C++ specifically, when you start without debugging, your program won't use the Windows debug heap. With the debugger attached, it will.
As Cody mentioned, one option is to simply not debug. But if you want to speed up your debugging sessions, here are a few things I've found can make a huge difference:
Remove debugging print statements that are no longer necessary. If you see your log filling up with text, that is likely slowing you down significantly.
Remove breakpoints (Ctrl+Shift+F5). A couple times I've noticed a huge drop in performance, and it turned out to be due to a breakpoint with a condition that was never met.