0
votes

I'm working through a project in Visual Studio 2013 and I got the following error: "Visual Studio cannot start debugging because the debug target is missing". I've tried changing the build output path under Project -> Properties but it still doesn't work. So what gives?

2
Did your project compile without errors? Do you see the .exe file in the project's bin\Debug directory? Did you disable your anti-malware? If it is Avast then get rid of it completely. - Hans Passant
It says there a build errors. I see the .exe file and why would I need to disable my anti-malware? - YoungMogul
if there are build errors it cant debug the new build, that should be obvious. when that happens it should offer to run the last good build which is what you probably see in the folder - Ňɏssa Pøngjǣrdenlarp
I created a new project and copied the code over, now it works. Too much of a hassle to try and fix these errors. Thanks for the help though. - YoungMogul

2 Answers

0
votes

Check your code and make sure you aren't missing a curly bracket anywhere. If one was accidentally deleted, moved, or misplaced, it causes this error among MANY others depending how critical the placement of the curly bracket is in your project.

^

I just recently had this problem in a project I was working on. I had highlighted to delete a section of code, and it took out a curly bracket with it. Unnoticed by myself, it took me a few days to finally realize that's what happened.

You won't get an error from the bracket missing, so it's stupid in itself and impossible to find at times.. but I had 51 errors, 7 warnings, and that "can't start debugging because the debug target is missing" error when I attempted to run the program, after the curly bracket went missing.

It's not to say that you might not have another issue going on that is causing this, but the curly brackets can wreak havoc if they aren't precisely placed. So it's worth checking into that before getting too extreme in options to "fix" the start error.

For future reference if this problem occurs again. Good luck.

0
votes

Possible VS 2019 Solution

Right Click on Solution Properties

Go under Common Properties> Startup Project

Set Single startup project

Right Click on Project Properties

Click Application

Set Application Type to Windows Forms Application or Console Application or Windows Service

Click Startup Object

Set to Anything Other than (None)

Left Click on Project Properties

Set Copy Build Output to Output to True

Then Run

Hopefully that works for you