Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013 runs project twice

When I press the "Local Windows Debugger" button when working on any basic C++ project in Visual Studio 2013, the console opens and the program outputs, but when the console closes, another console opens, the UI changes slightly and the program outputs again.

Steps to reproduce:

  1. Create a new C++ project enter image description her

  2. Inside the "Source Files" directory of the new project, create a file named "main.cpp"

  3. Put a basic hello world program into the file:

    #include &ltiostream&gt

    using namespace std;

    int main() {
        cout &lt&lt "Hello world!";
        cin.get();
    }

  1. Save the code and press the "Local windows debugger" button on the toolbar

  2. A console opens, and waits until you press enter

enter image description here

After the first console closes, a new one opens up, and the UI changes: enter image description here

Edit: Link to download a zip folder containing the project: Test Project.zip

like image 418
adventurerOK Avatar asked Jul 24 '14 19:07

adventurerOK


People also ask

How do I run the same project twice in Visual Studio?

Build your project once. Add the multiple . exes as "Projects" (right-click folder > Add > Existing Project, then select your exes, one by one) Now you can set up your "Multiple StartUp Projects" to launch all 5 "projects", and debug them at the same time.

How to debug multiple projects in Visual Studio?

On the Properties page, select Common Properties > Startup Project. Select Current selection, Single startup project and a project file, or Multiple startup projects. If you select Multiple startup projects, you can change the startup order and action to take for each project: Start, Start without debugging, or None.

How do I run multiple instances of a program in Visual Studio?

under Solution Properties->Startup Project, select Multiple Startup Projects and set the Action for both A and Dummy to Start. now hit F5 and your exe will be launched twice, each under a seperate debugging instance.

How do I remove set as startup project in Visual Studio?

Select a project and right click, then select 'Remove from StartUp Projects...'


1 Answers

I had avast deepscreen enabled. To disable, goto avast user interface -> Settings -> Antivirus and uncheck the box that says "Enable Deepscreen"

enter image description here

like image 96
adventurerOK Avatar answered Oct 01 '22 19:10

adventurerOK