Debug multiple EXE files using VC

Source: Internet
Author: User
How to add another project to a VC project and debug it together.
MyProgramYes: the main program auses B .exe, and then c.exe. Now, I want to debug C, but C can only be called by a and cannot be run independently. I want to debug Project A and Project C together. What can I do?
First, VC generally creates a project (workspace) as a project,
If you need multiple projects:
Method 1: Create a project and select "add to current workspace.
Method 2: an existing project can be added to the existing menu through "project" menu-"insert project to workspace.
Debugging problems:
First, when there are multiple projects in a workspace, you need to set up an activity project, that is, when you click "execute", it is started from this project, rather than other projects, you can right-click the project name (not in workspace) and select "set as active project. Set the breakpoint to debug to the specified place.
Note: If you want to use another project file, such as project. CPP should include B of Project B. h, then. in CPP, the relative path is used to specify the B. h path, but cannot be directly written as # include "B. h. Another better solution for porting is: Set the properties of Project A: Project-> Project Settings, select project A, then go to the C ++ tag, and pull it to preprocesser, add the path of Project B to additonal include directories, so that you can directly use # include "B. H "is used in project. To debug B .h or others, set the breakpoint in it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.