AndreasT
AndreasT

Reputation: 9801

Can't launch working Program from Visual Studio IDE

If I start my self written app from the explorer it works fine.

If I try to start it in visual studio(F5), it crashes at some point. It is also not dependant on the working directory!

It is quite annoying, because I cannot debug that way. (I could try attaching to the process after launch, but....)

Can anyone point me into a direction that I may have overlooked? What settings can cause such strange circumstances in general?

Thanks a lot in advance!

EDIT: System and stuff involved: WinXPProSp3(32bit), VS2005Sp1, Win SDK6.1, DXSDK09

EDIT: Clarification: The program I wish to debug crashes without a comment. Visual Studio has no problem and just states that the program to debug has terminated.

The Debug settings are all in order. I can debug and step through the beginning up to a certain point, where the debug info leaves me (some lib related to DirectShow) and the program peacefully dies.

I have only the Debug build configuration set up.

I hit F5 -> dead I start the same exe from outside the ide -> works like a charm.

I still am nowhere near of figuring this out... <:|

EDIT: Answer: A decoder library that doesn't work in debug mode managed to slip into my DirectShow filter chain. That caused all this strange behaviour. I simply uninstalled it. (somehow lowering the "merit" on the thing didn't work). Thanks for the help.

Upvotes: 0

Views: 973

Answers (3)

sgmoore
sgmoore

Reputation: 16067

Since you mention DirectShow, the FAQ says

When I run my application in the debugger, it crashes.

Some decoders are designed not to work while the application is attached to the debugger. Try running the application outside the debugger.

Not very helpful, but could explain why. You might have to go back to output debugging info using some logging routines or System.Diagnostics.Debug.Write

Upvotes: 1

DrHazzard
DrHazzard

Reputation: 221

Do you need the working directory to be correct for your program, the default behaviour is for the working directory to be where VS is running from.

If you do set it by going to the project properties, debugging and fill in working directory

Upvotes: 0

Chris Judge
Chris Judge

Reputation: 1992

When you say, "crashes at some point," do you mean that the IDE crashes or that your program stops execution and the IDE displays the source code line that triggered the unhandled exception?

Upvotes: 0

Related Questions