开发者

Application does not start in debugger

开发者 https://www.devze.com 2022-12-17 02:57 出处:网络
The application I\'m working does not start in the debugger of Visual Studio 2005. Here\'s what I do: I rebuild the application and hit F5 to start it

The application I'm working does not start in the debugger of Visual Studio 2005.

Here's what I do:

  • I rebuild the application and hit F5 to start it
  • The title of the VS2005-window says "projectname (Running) ..."
  • The debugger buttons appear but are greyed out
  • The application appears in the Windows task manager, but it has only 80k in memory usage
  • Nothing happens for a long while, and finally I get a windows with the following error message: "Debugging is being stopped but is not yet complete. You can force debugging to stop immediately, but any process being detached may be terminated instead. This window will automatically close when the debugging has completely stopped". The window does not disappear, so after a while I press the "Stop now" button.
  • Nothing happens for a while (the debugger buttons still visible, but greyed)
  • Some time later a new window appears: "Unable to start program '(path to exe)'. OLE har skickat en begäran och väntar på svar". The last sentence is swedish for "OLE has sent a request and is waiting for response". I press OK and the debugger buttons are gone.
  • The application is still running, and still has only 80k in memory usage.
  • I try to end the process with the task manager, but it is not killed.
  • I quit Visual Studio and finally the process is gone.

The application is an unmanaged开发者_如何学运维 C++ project, that use a lot of DLL-files as plugins. I'm using the "multi-threaded debug" runtime, and I've made sure all dependencies are compiled against the same runtime.

It was while doing that this problem appeared all of a sudden. I've tried to reverse my changes, but it doesn't help. Restarting the computer doesn't help either.

I've got the application running once or twice at random. If I then ended the application and started it again it wasn't started. So I don't think this is because of my configuration.

Any ideas?

One more note: the application starts and runs as it should if I start it from outside Visual Studio.


Sounds like a misbehaving DllMain() in one of the implicitly linked DLLs used by your program. You might get a hint from the Output window, it lists the names of the DLLs as they get loaded. If it is wininet.dll then you've fallen into a deadlock trap with the symbol server.


Ok, I've solved my problem, but I have no idea how.

One thing i tried was deleting all build files and exe and dll files, and then recompile everything. But that didn't help.

I then tried one thing at random: the plugins were in the same solution. So I removed them and tried to run again. And this time it worked! So I added all the plugin-projects back, and it still works!

So, I guess I will never know what happened. But removing and adding a project to a solution might solve someone elses problem too ... :)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号