0

When I am trying to run a program in Visual Studio, I do not have the option to debug the program. I only have the option to "Attach". I have looked up other solutions to this problem but I do not have anything to solve the problem. I will be attaching an image to this post. Thank you in advance for your time.

enter image description here

  • Microsoft Visual Studio Community 2017
    • Version 15.9.5
  • Microsoft .NET Framework
    • Version 4.7.03056
6
  • Do you have your build configuration in Release or Debug? Edit your question to provide the necessary information required to answer your question.
    – Ramhound
    Jan 16, 2019 at 1:31
  • Why did you copy and paste and provide every Visual Studio extension you have installed? You failed to indicate if you have your project in Debug or Release configuration.
    – Ramhound
    Jan 16, 2019 at 1:50
  • Where do I find that?
    – Letholor
    Jan 16, 2019 at 1:53
  • Did you open a project or a single file? Is this your program or someone elses? How much experience do you have with Visual Studio and C++? Jan 16, 2019 at 2:02
  • I opened a file. I have a little experience but not much. I opened a file for my class that I'm in.
    – Letholor
    Jan 16, 2019 at 2:04

1 Answer 1

1

You can't debug a single file, you'll need to open a Solution(.sln) or Project (.vcxproj) instead. The Solution/Project contains all the configuration, settings and files needed for the program. Inside the folder you got from school should be a .sln or .vcxproj file (or both). Solutions can hold multiple Projects. Projects are the individual programs you're writing. Open that and try debugging again.

1
  • 1
    It seems that I need to notify my professor that I was not given the solution file. That explains why I couldn't find it while trying to open it from Visual Studio.
    – Letholor
    Jan 16, 2019 at 3:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .