You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/reference/debug-generate-debug-info.md
+44-37Lines changed: 44 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,41 +46,48 @@ translation.priority.ht:
46
46
- "zh-tw"
47
47
---
48
48
# /DEBUG (Generate Debug Info)
49
-
```
50
-
/DEBUG
51
-
```
52
-
53
-
## Remarks
54
-
The /DEBUG option creates debugging information for the .exe file or DLL.
55
-
56
-
The linker puts the debugging information into a program database (PDB). It updates the PDB during subsequent builds of the program.
57
-
58
-
An .exe file or DLL created for debugging contains the name and path of the corresponding PDB. The debugger reads the embedded name and uses the PDB when you debug the program. The linker uses the base name of the program and the extension .pdb to name the program database, and embeds the path where it was created. To override this default, set [/PDB](../../build/reference/pdb-use-program-database.md) and specify a different file name.
59
-
60
-
The compiler's [Line Numbers Only](../../build/reference/z7-zi-zi-debug-information-format.md) (/Zd) or [C7 Compatible](../../build/reference/z7-zi-zi-debug-information-format.md) (/Z7) option causes the compiler to leave the debugging information in the .obj files. You can also use the [Program Database](../../build/reference/z7-zi-zi-debug-information-format.md) (/Zi) compiler option to store the debugging information in a PDB for the .obj file. The linker looks for the object's PDB first in the absolute path written in the .obj file, and then in the directory that contains the .obj file. You cannot specify an object's PDB file name or location to the linker.
61
-
62
-
[/INCREMENTAL](../../build/reference/incremental-link-incrementally.md) is implied when /DEBUG is specified.
63
-
64
-
/DEBUG changes the defaults for the [/OPT](../../build/reference/opt-optimizations.md) option from REF to NOREF and from ICF to NOICF (so, you will need to explicitly specify /OPT:REF or /OPT:ICF).
65
-
66
-
See Knowledge Base article Q121366, INFO: PDB and DBG Files - What They Are and How They Work, for more information on .PDB and .DBG files. You can find Knowledge Base articles in the MSDN Library, or at [http://support.microsoft.com](http://support.microsoft.com/).
67
-
68
-
It is not possible to create an .exe or .dll that contains debug information. Debug information is always placed in a .pdb file.
69
-
70
-
### To set this linker option in the Visual Studio development environment
71
-
72
-
1. Open the project's **Property Pages** dialog box. For details, see [Setting Visual C++ Project Properties](../../ide/working-with-project-properties.md).
73
-
74
-
2. Click the **Linker** folder.
75
-
76
-
3. Click the **Debugging** property page.
77
-
78
-
4. Modify the **Generate Debug Info** property.
79
-
80
-
### To set this linker option programmatically
81
-
82
-
1. See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.GenerateDebugInformation%2A>.
The **/DEBUG** option creates debugging information for the executable.
56
+
57
+
The linker puts the debugging information into a program database (PDB) file. It updates the PDB during subsequent builds of the program.
58
+
59
+
An executable (.exe file or DLL) created for debugging contains the name and path of the corresponding PDB. The debugger reads the embedded name and uses the PDB when you debug the program. The linker uses the base name of the program and the extension .pdb to name the program database, and embeds the path where it was created. To override this default, set [/PDB](../../build/reference/pdb-use-program-database.md) and specify a different file name.
60
+
61
+
The **/DEBUG:FULL** option is the linker default for debug builds in Visual Studio 2015, set when you specify /DEBUG with no additional options. This option moves all private symbol information from individual compilation products (object files and libraries) into a single PDB, and can be the most time-consuming part of the link. However, the full PDB can be used to debug the executable when no other build products are available, such as when the executable is deployed.
62
+
63
+
The **/DEBUG:FASTLINK** option is the linker default for debug builds in Visual Studio 2017 RC, set when you specify /DEBUG with no additional options. This option leaves private symbol information in the individual compilation products used to build the executable. It generates a limited PDB that indexes into the debug information in the object files and libraries used to build the executable instead of making a full copy. This option can link from two to four times as fast as full PDB generation, and is recommended when you are debugging locally and have the build products available. This limited PDB can't be used for debugging when the required build products are not available, such as when the executable is deployed on another computer. In a developer command prompt, you can use the mspdbcmf.exe tool to generate a full PDB from this limited PDB. In Visual Studio, use the Project or Build menu items for generating a full PDB file to create a full PDB for the project or solution.
64
+
65
+
The **/DEBUG:NONE** option does not generate a PDB, and is the linker default for release builds.
66
+
67
+
The compiler's [C7 Compatible](../../build/reference/z7-zi-zi-debug-information-format.md) (/Z7) option causes the compiler to leave the debugging information in the .obj files. You can also use the [Program Database](../../build/reference/z7-zi-zi-debug-information-format.md) (/Zi) compiler option to store the debugging information in a PDB for the .obj file. The linker looks for the object's PDB first in the absolute path written in the .obj file, and then in the directory that contains the .obj file. You cannot specify an object's PDB file name or location to the linker.
68
+
69
+
[/INCREMENTAL](../../build/reference/incremental-link-incrementally.md) is implied when /DEBUG is specified.
70
+
71
+
/DEBUG changes the defaults for the [/OPT](../../build/reference/opt-optimizations.md) option from REF to NOREF and from ICF to NOICF, so if you want the original defaults, you must explicitly specify /OPT:REF or /OPT:ICF.
72
+
73
+
It is not possible to create an .exe or .dll that contains debug information. Debug information is always placed in a .obj or .pdb file.
74
+
75
+
### To set this linker option in the Visual Studio development environment
76
+
77
+
1. Open the project's **Property Pages** dialog box. For details, see [Setting Visual C++ Project Properties](../Topic/Working%20with%20Project%20Properties.md).
78
+
79
+
2. Click the **Linker** folder.
80
+
81
+
3. Click the **Debugging** property page.
82
+
83
+
4. Modify the **Generate Debug Info** property to enable PDB generation. This enables /DEBUG:FASTLINK by default in Visual Studio 2017 RC.
84
+
85
+
4. Modify the **Generate Full Program Database File** property to enable /DEBUG:FULL for full PDB generation for every incremental build.
86
+
87
+
### To set this linker option programmatically
88
+
89
+
1. See <xref:Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.GenerateDebugInformation%2A>.
Use the **/diagnostics** compiler option to specify the display of error and warning location information.
42
+
43
+
## Syntax
44
+
```
45
+
/diagnostics:{caret|classic|column}
46
+
```
47
+
48
+
## Remarks
49
+
The **/diagnostics** compiler option controls the display of error and warning information.
50
+
51
+
The **/diagnostics:classic** option is the default, which reports only the line number where the issue was found.
52
+
53
+
The **/diagnostics:column** option also includes the column where the issue was found. This can help you identify the specific language construct or character that is causing the issue.
54
+
55
+
The **/diagnostics:caret** option includes the column where the issue was found and places a caret (^) under the location in the line of code where the issue was detected.
56
+
57
+
Note that in some cases, the compiler does not detect an issue where it occurred. For example, a missing semicolon may not be detected until other, unexpected symbols have been encountered. The caret is placed and column is reported where the compiler detected that something was wrong, which is not always where you need to make your correction.
title: "-permissive- (Standards conformance) | Microsoft Docs"
3
+
ms.custom: ""
4
+
ms.date: "11/11/2016"
5
+
ms.prod: "visual-studio-dev14"
6
+
ms.reviewer: ""
7
+
ms.suite: ""
8
+
ms.technology:
9
+
- "devlang-cpp"
10
+
ms.tgt_pltfrm: ""
11
+
ms.topic: "article"
12
+
f1_keywords:
13
+
- "/permissive"
14
+
dev_langs:
15
+
- "C++"
16
+
helpviewer_keywords:
17
+
- "/permissive compiler options [C++]"
18
+
- "-permissive compiler options [C++]"
19
+
- "Standards conformance compiler options"
20
+
- "permissive compiler options [C++]"
21
+
ms.assetid: db1cc175-6e93-4a2e-9396-c3725d2d8f71
22
+
caps.latest.revision: 15
23
+
author: "corob-msft"
24
+
ms.author: "corob"
25
+
manager: "ghogen"
26
+
translation.priority.ht:
27
+
- "cs-cz"
28
+
- "de-de"
29
+
- "es-es"
30
+
- "fr-fr"
31
+
- "it-it"
32
+
- "ja-jp"
33
+
- "ko-kr"
34
+
- "pl-pl"
35
+
- "pt-br"
36
+
- "ru-ru"
37
+
- "tr-tr"
38
+
- "zh-cn"
39
+
- "zh-tw"
40
+
---
41
+
# /permissive- (Standards conformance)
42
+
You can use the **/permissive-** compiler option to specify strict standards-conformant compiler behavior. Note that the trailing dash is required. This option disables language extensions, similar to the deprecated [/Za](../../build/reference/za-ze-disable-language-extensions.md) option, and sets the [/Zc](../../build/reference/zc-conformance.md) compiler options for strict conformance. Not all standards-conformant code is supported by the Visual C++ compiler in Visual Studio 2017 RC. However, when this option is set, the compiler generates errors or warnings when non-standard language constructs are detected in your code.
43
+
44
+
For more information about conformance issues in Visual C++, see [Nonstandard Behavior](../../cpp/nonstandard-behavior.md).
Copy file name to clipboardExpand all lines: docs/ide/using-the-visual-studio-ide-for-cpp-desktop-development.md
+31-25Lines changed: 31 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,28 +35,34 @@ translation.priority.ht:
35
35
- "zh-tw"
36
36
---
37
37
# Using the Visual Studio IDE for C++ Desktop Development
38
-
The [!INCLUDE[vsprvs](../assembler/masm/includes/vsprvs_md.md)] Integrated Development Environment (IDE) offers a set of tools that help you write and modify code, and also detect and correct errors.
39
-
40
-
In the articles in this section of the documentation, you create a standard C++ program and test its functionality by using features in [!INCLUDE[vsprvs](../assembler/masm/includes/vsprvs_md.md)]. The basic program that you create tracks how many players are playing different card games.
41
-
42
-
Here are the articles:
43
-
44
-
-[Walkthrough: Working with Projects and Solutions (C++)](../ide/walkthrough-working-with-projects-and-solutions-cpp.md)
45
-
46
-
-[Walkthrough: Building a Project (C++)](../ide/walkthrough-building-a-project-cpp.md)
47
-
48
-
-[Walkthrough: Testing a Project (C++)](../ide/walkthrough-testing-a-project-cpp.md)
49
-
50
-
-[Walkthrough: Debugging a Project (C++)](../ide/walkthrough-debugging-a-project-cpp.md)
51
-
52
-
-[Walkthrough: Deploying Your Program (C++)](../ide/walkthrough-deploying-your-program-cpp.md)
53
-
54
-
## Prerequisites
55
-
This topic assumes that you understand the fundamentals of the C++ language.
56
-
57
-
## Next Steps
58
-
**Previous:**[Visual C++ Guided Tour](http://msdn.microsoft.com/en-us/499cb66f-7df1-45d6-8b6b-33d94fd1f17c)|**Next:**[Walkthrough: Working with Projects and Solutions (C++)](../ide/walkthrough-working-with-projects-and-solutions-cpp.md)
59
-
60
-
## See Also
61
-
[Visual C++ Guided Tour](http://msdn.microsoft.com/en-us/499cb66f-7df1-45d6-8b6b-33d94fd1f17c)
62
-
[Application Development in Visual Studio](http://msdn.microsoft.com/en-us/97490c1b-a247-41fb-8f2c-bc4c201eff68)
38
+
39
+
The Visual Studio Integrated Development Environment (IDE) offers a set of features that help you manage large and small code projects, write and refactor your code, and detect and correct errors by using both static analysis and powerful debugging tools. This set of articles is designed to walk you through each step you'll need to manage your projects, write, test, and debug your code, and then deploy it to another computer.
40
+
41
+
## Prerequisites
42
+
43
+
If you haven't installed Visual Studio yet, now is the time. To get Visual Studio, you can download it from [Visual Studio Downloads](http://www.visualstudio.com/downloads/download-visual-studio-vs.aspx). Be sure to include the Visual C++ development tools when you install Visual Studio, because they are not installed by default. For more information about how to install Visual Studio, see []().
44
+
45
+
These walkthroughs assume that you have installed Visual Studio and the Visual C++ language and components required for Windows Desktop development. We also assume you understand the fundamentals of the C++ language. If you need to learn C++, there are many books and web resources available. One good place to start is the [Get Started](https://isocpp.org/get-started) page of the Standard C++ Foundation website.
46
+
47
+
Once your Visual Studio installation is complete, you are ready to continue.
48
+
49
+
## Get Started
50
+
51
+
To get started using the Visual Studio IDE to build C++ apps, work through each of these topics in order. Each one builds on the work you completed in the previous topics:
52
+
53
+
-[Walkthrough: Working with Projects and Solutions (C++)](../ide/walkthrough-working-with-projects-and-solutions-cpp.md)
54
+
55
+
-[Walkthrough: Building a Project (C++)](../ide/walkthrough-building-a-project-cpp.md)
56
+
57
+
-[Walkthrough: Testing a Project (C++)](../ide/walkthrough-testing-a-project-cpp.md)
58
+
59
+
-[Walkthrough: Debugging a Project (C++)](../ide/walkthrough-debugging-a-project-cpp.md)
60
+
61
+
-[Walkthrough: Deploying Your Program (C++)](../ide/walkthrough-deploying-your-program-cpp.md)
62
+
63
+
## Next Steps
64
+
65
+
Once you've completed these walkthroughs, you're ready to start building your own projects. For more information and resources for Visual C++ development, see [Visual C++ in Visual Studio](https://msdn.microsoft.com/library/60k1461a.aspx).
66
+
67
+
## See Also
68
+
[Application Development in Visual Studio](http://msdn.microsoft.com/en-us/97490c1b-a247-41fb-8f2c-bc4c201eff68)
0 commit comments