How to debug compiled console applications (VC ++)

Source: Internet
Author: User

Sometimes some console applications will be testedProgramThese programs are directly tested from The Daily daily build. Okay. If there is a problem, you still need to locate the problem. Sometimes, opening a single project involves many references and cannot be debugged and run. The following describes how to use the compiled version of DEBUG to debugSource code.

Two points need to be clarified. First, the console application should be in debug; second, the console application and the source to be debugged.CodeConsistent version.

1. Open vsts and create a VC ++ Win32 console application;

2. Right-click the new project name, click 'properties', and select 'debug' in the left-side navigation pane ';

Enter the debug console application in command;

Enter parameters in command arguments;

In the working directory, enter the directory where the console application is located;

3. Specify symbol;

Tools-options-debugging-symbol;

Specifies the location of the directory where the symbol file is located (. PDB)

4. Open the. cpp file with the main function to be debugged

 

You can set breakpoint debugging as needed.

It is also suitable for debugging C # console applications.

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.