如何回報 Microsoft C++ 工具組或文件的問題How to report a problem with the Microsoft C++ toolset or documentation

如果在 Microsoft C++ 編譯器 (MSVC)、連結器或其他工具和程式庫中發現問題,請告知我們。If you find problems in the Microsoft C++ compiler (MSVC), the linker, or other tools and libraries, we want to know about them. 如果問題是出自文件,也請告知我們。When the issue is in our documentation, we want to know about that, too.

如何回報 C++ 工具組問題How to report a C++ toolset issue

讓我們知道問題的最佳方式是將一份內含描述所發現問題的報表傳送給我們。The best way to let us know about a problem is to send us a report that includes a description of the problem you've discovered. 該報告中應該有關於如何建置程式的所有詳細資料。It should have all the details about how you build your program. 此外,也應該包含 重現,以及可用來在我們自己的電腦上重現問題的完整測試案例。And it should include a repro, a complete test case we can use to reproduce the problem on our own machines. 這項資訊可讓我們快速確認問題是存在於程式碼,而不是環境本機的問題。This information lets us quickly verify that the problem exists in our code and isn't local to your environment. 它可協助我們判斷是否影響其他版本的編譯器,並診斷其原因。It helps us determine whether it affects other versions of the compiler, and to diagnose its cause.

在下列各節中,您將了解如何建立良好的報表。In the sections below, you'll read about what makes a good report. 我們會描述如何針對您所發現的問題類型產生報表,以及如何將報表傳送給產品小組。We describe how to generate a repro for the kind of issue you've found, and how to send your report to the product team. 您的報表對我們和您這類其他開發人員而言十分重要。Your reports are important to us and to other developers like you. 感謝您協助我們改善 Microsoft C++!Thank you for helping us improve Microsoft C++!

如何準備報表How to prepare your report

建立高品質的報表很重要,因為對我們來說,如果沒有完整的資訊,要重現您所發現的問題很困難。It's important to create a high-quality report, because it's difficult for us to reproduce the problem you found without complete information. 您的報表越好,我們就越能更有效率地重新建立並診斷問題。The better your report is, the more effectively we can recreate and diagnose the problem.

您的報表至少應該包含:At a minimum, your report should contain:

  • 所使用工具組的完整版本資訊。The full version information of the toolset you're using.

  • 用來建置您程式碼的完整 cl.exe 命令列。The full cl.exe command line used to build your code.

  • 所發現問題的詳細描述。A detailed description of the problem you found.

  • 重現:可示範問題的完整、簡化、獨立原始程式碼範例。A repro: a complete, simplified, self-contained source code example that demonstrates the problem.

請閱讀以深入了解我們需要的特定資訊、可找到它的位置,以及如何建立良好重現。Read on to learn more about the specific information we need and where you can find it, and how to create a good repro.

工具組版本The toolset version

我們需要完整版本資訊以及造成問題之工具組的目標架構。We need the full version information and the target architecture of the toolset that causes the problem. 如此我們能夠在我們的電腦上針對相同的工具組測試您的重現。That's so we can test your repro against the same toolset on our machines. 如果我們可以重現問題,這項資訊也會提供一個起點,讓我們調查哪些其他版本的工具組有相同的問題。If we can reproduce the problem, this information also gives us a starting point to investigate which other versions of the toolset have the same problem.

回報您編譯器的完整版本To report the full version of your compiler

  1. 開啟 開發人員命令提示字元,以符合用來建置專案的 Visual Studio 版本和組態架構。Open the Developer Command Prompt that matches the Visual Studio version and configuration architecture used to build your project. 例如,如果您是針對 x64 目標使用 Visual Studio 2017 on x64 進行建置,則請選擇 [x64 Native Tools Command Prompt for VS 2017] (適用於 VS 2017 的 x64 Native Tools 命令提示字元)。For example, if you build by using Visual Studio 2017 on x64 for x64 targets, choose x64 Native Tools Command Prompt for VS 2017. 如需詳細資訊,請參閱開發人員命令提示字元捷徑For more information, see Developer command prompt shortcuts.

  2. 在開發人員命令提示字元主控台視窗中,輸入 cl /Bv 命令。In the developer command prompt console window, enter the command cl /Bv.

輸出應該類似如下:The output should look similar to:

C:\Users\username\Source>cl /Bv
Microsoft (R) C/C++ Optimizing Compiler Version 19.14.26428.1 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

Compiler Passes:
 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\cl.exe:        Version 19.14.26428.1
 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\c1.dll:        Version 19.14.26428.1
 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\c1xx.dll:      Version 19.14.26428.1
 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\c2.dll:        Version 19.14.26428.1
 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\link.exe:      Version 14.14.26428.1
 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\mspdb140.dll:  Version 14.14.26428.1
 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x86\1033\clui.dll: Version 19.14.26428.1

cl : Command line error D8003 : missing source filename

複製整個輸出,並將其貼入您的報表。Copy and paste the entire output into your report.

命令列The command line

我們需要用來建置您程式碼的確切命令列 (cl.exe 和其所有引數)。We need the exact command line, cl.exe and all of its arguments, used to build your code. 如此可以在我們的電腦上以完全相同的方式進行建置。That's so we can build it in exactly the same way on our machines. 因為只有在使用特定引數或引數組合進行建置時才會存在您發現的問題,所以這十分重要。It's important because the problem you've found might only exist when building with a certain argument or combination of arguments.

找到這項資訊的最佳位置是在遇到問題之後那時的組建記錄檔。The best place to find this information is in the build log immediately after you experience the problem. 這確保命令列包含可能造成問題的完全相同引數。It ensures that the command line contains exactly the same arguments that might contribute to the problem.

回報命令列內容To report the contents of the command line

  1. 找到並開啟 CL.command.1.tlog 檔案。Locate the CL.command.1.tlog file and open it. 根據預設,這個檔案位於您的 [檔] 資料夾中,位於 Visual Studio 版本專案的 [方案名稱]、[專案名稱] 設定為 [ \ \ 存放庫] \ \ \ \ \ ,或在您的使用者資料夾 \ \ \ \ \ \ \ 中的 [來源] 的 [程式名稱名稱] 設定專案名稱。By default, this file is located in your Documents folder in \Visual Studio version\Projects\SolutionName\ProjectName\Configuration\ProjectName.tlog\CL.command.1.tlog, or in your User folder under \Source\Repos\SolutionName\ProjectName\Configuration\ProjectName.tlog\CL.command.1.tlog. 如果您使用另一個組建系統,或已經變更您專案的預設位置,則它可能是在不同的位置。It may be in a different location if you use another build system, or if you've changed the default location for your project.

    在此檔案內,您可以找到之後用來編譯原始程式碼檔之命令列引數的原始程式碼檔名稱,而且一行一個引數。Inside this file, you'll find the names of your source code files, followed by the command-line arguments used to compile them, each on separate lines.

  2. 找到包含發生問題之原始程式碼檔名稱的那一行。Locate the line that contains the name of the source code file where the problem occurs. 該行下面的那一行會包含對應的 cl.exe 命令引數。The line below it contains the corresponding cl.exe command arguments.

複製整個命令列,並將其貼入您的報表。Copy and paste the entire command line into your report.

問題描述A description of the problem

我們需要您所發現問題的詳細描述。We need a detailed description of the problem you've found. 如此我們可以確認看到您電腦上的相同效果。That's so we can verify that we see the same effect on our machines. 它有時也可讓我們知道您嘗試完成的作業以及預期發生的情況。It's also sometimes useful for us to know what you were trying to accomplish, and what you expected to happen.

良好的描述可提供工具組所提供的 確切錯誤訊息,或您看到的確切執行階段行為。A good description provides the exact error messages given by the toolset, or the exact runtime behavior you see. 我們需要這項資訊來驗證我們已正確地重現問題。We need this information to verify that we've properly reproduced the issue. 請包含 所有 編譯器輸出,而不只是最後一個錯誤訊息。Include all of the compiler output, not just the last error message. 我們需要查看導致您所回報問題的所有項目。We need to see everything that led up to the issue you report. 如果您可以使用命令列編譯器來複製問題,則會偏好使用該編譯器輸出。If you can duplicate the issue by using the command-line compiler, that compiler output is preferred. IDE 和其他組建系統可以篩選您看到此項目,或只擷取錯誤訊息的第一行的錯誤訊息。The IDE and other build systems may filter the error messages you see, or only capture the first line of an error message.

如果問題是編譯器接受無效的程式碼,而且未產生診斷,則請在報表中納入這一點。If the issue is that the compiler accepts invalid code and doesn't generate a diagnostic, include that in your report.

若要報告執行階段行為問題,請包含程式所列印的 確切複本,以及您預期看到的確切複本。To report a runtime behavior problem, include an exact copy of what the program prints, and what you expect to see. 在理想情況下,您會將該複本內嵌在輸出陳述式本身中,例如,printf("This should be 5: %d\n", actual_result);Ideally, you'll embed it in the output statement itself, for example, printf("This should be 5: %d\n", actual_result);. 如果您的程式當機或停止回應,則也會提及該問題。If your program crashes or hangs, mention that as well.

新增可能有助於診斷所發現問題的其他任何詳細資料,例如您已經發現的任何因應措施。Add any other details that might help us diagnose the problem you found, such as any work-arounds you've discovered. 請嘗試不要在報表的其他位置出現發現的重複資訊。Try not to repeat information found elsewhere in your report.

重現The repro

重現 是完整且獨立的原始程式碼範例。A repro is a complete, self-contained source code example. 它會以重現方式示範您所發現的問題,因此會顯示名稱。It reproducibly demonstrates the problem you've found, hence the name. 我們需要重現,才能在電腦上重現錯誤。We need a repro so that we can reproduce the error on our machines. 程式碼本身應該就足以建立可編譯和執行的基本可執行檔。The code should be sufficient by itself to create a basic executable that compiles and runs. 在不適用於您所發現問題時編譯和執行的簡單可執行檔。Or, that would compile and run, if not for the problem you've found. 重現不是程式碼片段。A repro isn't a code snippet. 它應該有完整的函式和類別,而且包含所有必要 #include 指示詞,即使針對標準標頭也是一樣。It should have complete functions and classes, and contain all the necessary #include directives, even for the standard headers.

如何建立良好的重現What makes a good repro

良好的重現為:A good repro is:

  • 最小。Minimal. 重現應該越小越好,但仍然確切地示範您所發現的問題。Repros should be as small as possible yet still demonstrate exactly the problem you found. 重現不需要複雜或實際。Repros don't need to be complex or realistic. 它們只需要顯示符合 Standard 或所記載編譯器實作的程式碼。They only need to show code that conforms to the Standard, or to the documented compiler implementation. 如果缺少診斷,您的重現應該會顯示不一致的程式碼。For a missing diagnostic, your repro should show the code that's not conformant. 包含剛好足夠的程式碼來示範問題的簡單、重要重現最適合。Simple, to-the-point repros that contain only enough code to demonstrate the problem are best. 如果您可以排除或簡化程式碼並保持一致,同時將問題保持不變,則請這麼做。If you can eliminate or simplify the code and remain conformant, and also leave the issue unchanged, then do so. 您不需要包含適用的相反範例程式碼。You don't need to include counter-examples of code that works.

  • 獨立。Self-Contained. 重現應該避免不必要的相依性。Repros should avoid unnecessary dependencies. 如果您可以重現問題,而不需要協力廠商程式庫,則請這樣做。If you can reproduce the problem without third-party libraries, then do so. 如果您除了簡單的輸出陳述式 (例如,puts("this shouldn't compile");std::cout << value;printf("%d\n", value);) 之外,不需要任何程式庫程式碼即可重現問題,則請這麼做。If you can reproduce the problem without any library code besides simple output statements (for example, puts("this shouldn't compile");, std::cout << value;, and printf("%d\n", value);), then do so. 如果範例可以壓縮成單一原始程式碼檔,而未參考任何使用者標頭,則它十分適合。It's ideal if the example can be condensed to a single source code file, without reference to any user headers. 減少視為可能造成問題的程式碼數量十分有幫助。Reducing the amount of code we have to consider as a possible contributor to the problem is enormously helpful to us.

  • 針對最新編譯器版本。Against the latest compiler version. 如果可能的話,重現應該使用最新版本工具組的最新更新。Repros should use the most recent update to the latest version of the toolset whenever possible. 或者,使用下次更新的最新發行前版本或下一個主要版本。Or, use the most recent prerelease version of the next update or next major release. 在新版本中,通常已修正舊版工具組中所發現的問題。Problems you may find in older versions of the toolset have often been fixed in newer versions. 只有在例外狀況下,修正程式才會往回移植到較舊的版本。Fixes are backported to older versions only in exceptional circumstances.

  • 針對其他編譯器檢查 (如果相關)。Checked against other compilers if relevant. 涉及可攜式 C++ 程式碼的報表應該確認其他編譯器行為 (可能的話)。Repros that involve portable C++ code should verify behavior against other compilers if possible. C++ Standard 最終會判斷程式正確性,而且沒有編譯器是完美的。The C++ standard ultimately determines program correctness, and no compiler is perfect. 不過,當 Clang 和 GCC 接受沒有診斷的程式碼而 MSVC 不接受時,您可能會在我們的編譯器中發現一個 Bug。However, when Clang and GCC accept your code without a diagnostic, and MSVC doesn't, you've probably found a bug in our compiler. (其他可能的情況包括 Unix 和 Windows 行為的差異,或不同層級的 c + + 標準執行等差異。 ) 當所有編譯器都拒絕您的程式碼時,可能是您的程式碼不正確。(Other possibilities include differences in Unix and Windows behavior, or different levels of C++ standards implementation, and so on.) When all the compilers reject your code, then it's likely that your code is incorrect. 查看不同的錯誤訊息可以協助您自行診斷問題。Seeing different error messages may help you diagnose the issue yourself.

    您可以在 ISO C++ 網站的線上 C++ 編譯器中,或 GitHub 上這個策劃的線上 C++ 編譯器清單,尋找線上編譯器清單來測試您的程式碼。You can find lists of online compilers to test your code against in Online C++ compilers on the ISO C++ website, or this curated List of Online C++ Compilers on GitHub. 某些特定的範例包括 Wandbox編譯器 ExplorerSome specific examples include Wandbox and Compiler Explorer.

    注意

    線上編譯器網站未與 Microsoft 建立關聯。The online compiler websites are not affiliated with Microsoft. 許多線上編譯器網站都會當作個人專案執行。Many online compiler websites are run as personal projects. 在您閱讀這篇文章時,其中一些網站可能無法使用,但搜尋應該會發現您可以使用的其他網站。Some of these sites may be unavailable when you read this, but a search should find others you can use.

編譯器、連結器和程式庫中的問題,傾向於以特定方式予以顯示。Problems in the compiler, linker, and in the libraries, tend to show themselves in particular ways. 您所發現問題的類型將決定應該包含在報表中的重現類型。The kind of problem you find will determine what kind of repro you should include in your report. 如果沒有適當的重現,我們就無法進行調查。Without an appropriate repro, we have nothing to investigate. 以下是您可能會看到的數種問題。Here are a few of the kinds of issues that you may see. 我們會包含如何產生您應該用來回報每種問題之重現類型的指示。We include instructions on how to generate the kind of repro you should use to report each kind of problem.

前端 (剖析器) 損毀Frontend (parser) crash

前端損毀是在編譯器的剖析階段期間發生。Frontend crashes occur during the parsing phase of the compiler. 通常,編譯器會發出嚴重錯誤 C1001,並參考發生錯誤所在的原始程式碼檔和行號。Typically, the compiler emits Fatal Error C1001, and references the source code file and line number on which the error occurred. 它通常會提及一個名為 msc1.cpp 的檔案,但您可以忽略這個詳細資料。It often mentions a file named msc1.cpp, but you can ignore this detail.

針對這種損毀,請提供前置處理過的重現For this kind of crash, provide a Preprocessed repro.

以下是這種損毀的範例編譯器輸出︰Here's example compiler output for this kind of crash:

SandBoxHost.cpp
d:\o\dev\search\foundation\common\tools\sandbox\managed\managed.h(929):
        fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'msc1.cpp', line 1369)
To work around this problem, try simplifying or changing the program near the
        locations listed above.
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
d:\o\dev\search\foundation\common\tools\sandbox\managed\managed.h(929):
        note: This diagnostic occurred in the compiler generated function
        'void Microsoft::Ceres::Common::Tools::Sandbox::SandBoxedProcess::Dispose(bool)'
Internal Compiler Error in d:\o\dev\otools\bin\x64\cl.exe.  You will be prompted
        to send an error report to Microsoft later.
INTERNAL COMPILER ERROR in 'd:\o\dev\otools\bin\x64\cl.exe'
    Please choose the Technical Support command on the Visual C++
    Help menu, or open the Technical Support help file for more information

後端 (程式碼產生) 損毀Backend (code generation) crash

後端損毀是在編譯器的程式碼產生階段期間發生。Backend crashes occur during the code generation phase of the compiler. 通常,編譯器會發出嚴重錯誤 C1001,而且它可能不會參考與問題相關聯的原始程式碼檔和行號。Typically, the compiler emits Fatal Error C1001, and it might not reference the source code file and line number associated with the problem. 它通常會提及檔案編譯器 \utc\src\p2\main.c,但是您可以忽略這個詳細資料。It often mentions the file compiler\utc\src\p2\main.c, but you can ignore this detail.

針對這種損毀,如果您要使用由 cl.exe 的 /GL 命令列引數所啟用的連結時產生程式碼 (LTCG),請提供 連結重現For this kind of crash, provide a Link repro if you're using Link-Time Code Generation (LTCG), enabled by the /GL command-line argument to cl.exe. 否則,請改成提供前置處理過的重現If not, provide a Preprocessed repro instead.

以下是未使用 LTCG 這種後端損毀的範例編譯器輸出。Here's example compiler output for a backend crash in which LTCG isn't used. 如果您的編譯器輸出看起來如下所示,則應該提供前置處理過的重現If your compiler output looks like the following, you should provide a Preprocessed repro.

repro.cpp
\\officefile\public\tadg\vc14\comperror\repro.cpp(13) : fatal error C1001:
        An internal error has occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 230)
To work around this problem, try simplifying or changing the program near the
        locations listed above.
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
INTERNAL COMPILER ERROR in
        'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe'
    Please choose the Technical Support command on the Visual C++
    Help menu, or open the Technical Support help file for more information

如果開頭為 編譯器內部錯誤 的行提及 link.exe,而非 cl.exe,則已啟用 LTCG。If the line that begins with INTERNAL COMPILER ERROR mentions link.exe, rather than cl.exe, LTCG was enabled. 在此情況下,請提供連結重現Provide a Link repro in this case. 當不確定是否已從編譯器錯誤訊息啟用 LTCG 時,請檢查命令列引數。When it's not clear whether LTCG was enabled from the compiler error message, examine the command-line arguments. 您已經在 /GL 命令列引數的先前步驟中,從組建記錄檔複製它們。You copied them from your build log, in a previous step for the /GL command-line argument.

連結器損毀Linker crash

連結器損毀是在執行編譯器後的連結階段期間發生。Linker crashes occur during the linking phase, after the compiler has run. 連結器通常會發出連結器工具錯誤 LNK1000Typically, the linker will emit Linker Tools Error LNK1000.

注意

如果輸出提及 C1001,或涉及連結時產生程式碼,請參閱後端 (程式碼產生) 損毀If the output mentions C1001 or involves Link-Time Code Generation, refer to Backend (code generation) crash instead.

針對這種損毀,請提供連結重現For this kind of crash, provide a Link repro.

以下是這種損毀的編譯器輸出範例:Here's an example of compiler output for this kind of crash:

z:\foo.obj : error LNK1000: Internal error during IMAGE::Pass2

  Version 14.00.22816.0

  ExceptionCode            = C0000005
  ExceptionFlags           = 00000000
  ExceptionAddress         = 00007FF73C9ED0E6 (00007FF73C9E0000)
        "z:\tools\bin\x64\link.exe"
  NumberParameters         = 00000002
  ExceptionInformation[ 0] = 0000000000000000
  ExceptionInformation[ 1] = FFFFFFFFFFFFFFFF

CONTEXT:

  Rax    = 0000000000000400  R8     = 0000000000000000
  Rbx    = 000000655DF82580  R9     = 00007FF840D2E490
  Rcx    = 005C006B006F006F  R10    = 000000655F97E690
  Rdx    = 000000655F97E270  R11    = 0000000000000400
  Rsp    = 000000655F97E248  R12    = 0000000000000000
  Rbp    = 000000655F97EFB0  E13    = 0000000000000000
  Rsi    = 000000655DF82580  R14    = 000000655F97F390
  Rdi    = 0000000000000000  R15    = 0000000000000000
  Rip    = 00007FF73C9ED0E6  EFlags = 0000000000010206
  SegCs  = 0000000000000033  SegDs  = 000000000000002B
  SegSs  = 000000000000002B  SegEs  = 000000000000002B
  SegFs  = 0000000000000053  SegGs  = 000000000000002B
  Dr0    = 0000000000000000  Dr3    = 0000000000000000
  Dr1    = 0000000000000000  Dr6    = 0000000000000000
  Dr2    = 0000000000000000  Dr7    = 0000000000000000

如果已啟用累加連結,而且只有在成功初始連結之後才會發生損毀 (也就是,只有在後續累加連結所依據的第一個完整連結之後),也請提供物件 (.obj) 和程式庫 (.lib) 檔案的複本,這些檔案必須對應到初始連結完成後經過修改的原始程式檔。If incremental linking is enabled, and the crash occurred only after a successful initial link, that is, only after the first full link on which a later incremental link is based, also provide a copy of the object (.obj) and library (.lib) files that correspond to source files modified after the initial link was completed.

產生錯誤的程式碼Bad code generation

產生錯誤的程式碼十分罕見。Bad code generation is rare. 當編譯器錯誤地產生不正確的程式碼讓您的應用程式在執行階段損毀時會發生這個情況。It occurs when the compiler mistakenly generates incorrect code that causes your application to crash at runtime. 但是,它應該產生正確的程式碼,或在編譯時期偵測問題。Instead, it should generate correct code, or detect a problem at compile time. 如果您認為所發現的問題會導致產生錯誤的程式碼,請使用與後端 (程式碼產生) 損毀相同的方式來處理報表。If you believe the problem you've found results in bad code generation, treat your report the same as a Backend (code generation) crash.

針對這種損毀,如果您要使用 cl.exe 的 /GL 命令列引數,請提供 連結重現For this kind of crash, provide a Link repro if you're using the /GL command-line argument to cl.exe. 否則,請提供前置處理過的重現Provide a Preprocessed repro if not.

如何產生重現How to generate a repro

為了協助追蹤問題來源,良好重現十分重要。To help us track down the source of the problem, a good repro is vital. 執行下面針對特定重現類型所述的任何步驟之前,請嘗試盡可能緊縮示範問題的程式碼。Before you do any of the steps outlined below for specific kinds of repros, try to condense the code that demonstrates the problem as much as possible. 嘗試刪除或最小化相依性、必要標頭和程式庫。Try to eliminate or minimize dependencies, required headers, and libraries. 盡可能地限制使用的編譯器選項和前置處理器定義。Limit the compiler options and preprocessor definitions used, if possible.

以下是產生用來回報不同問題類型之各種重現類型的指示。Below are instructions for generating the various kinds of repros you'll use to report different kinds of problems.

前置處理過的重現Preprocessed repros

前置處理過的重現 是單一原始程式檔,可示範問題。A Preprocessed repro is a single source file that demonstrates a problem. 它是從 C 前置處理器的輸出產生的。It's generated from the output of the C preprocessor. 若要建立一個前置處理過的重現,請使用原始重現原始程式檔上的 /P 編譯器選項。To create one, use the /P compiler option on the original repro source file. 此選項內嵌包含的標頭來移除其他原始程式檔和標頭檔的相依性。This option inlines the included headers to remove dependencies on additional source and header files. 此選項也會解析巨集、#ifdef 條件以及可能與您的本機環境相依的其他前置處理器命令。The option also resolves macros, #ifdef conditionals, and other preprocessor commands that could depend on your local environment.

注意

因為我們通常會想要替代最新進行中的實作,以查看我們是否已修正問題,所以對於可能是標準程式庫實作中 Bug 所造成的問題,前置處理過的重現不實用。Preprocessed repros are not as useful for problems that might be the result of bugs in our standard library implementation, because we will often want to substitute our latest, in-progress implementation to see whether we've already fixed the problem. 在此情況下,請不要前置處理重現,而且如果您無法將問題減少為單一原始程式檔,則請將程式碼封裝為 .zip 檔案或類似檔案,或考慮使用 IDE 專案重現。In this case, don't preprocess the repro, and if you can't reduce the problem to a single source file, package your code into a .zip file or similar, or consider using an IDE project repro. 如需詳細資訊,請參閱其他重現For more information, see Other repros.

前置處理原始程式碼檔To preprocess a source code file

  1. 擷取用來建置重現的命令列引數,如回報命令列內容中所述。Capture the command-line arguments used to build your repro, as described in To report the contents of the command line.

  2. 開啟 開發人員命令提示字元,以符合用來建置專案的 Visual Studio 版本和組態架構。Open the Developer Command Prompt that matches the Visual Studio version and configuration architecture used to build your project.

  3. 切換至包含重現專案的目錄。Change to the directory that contains your repro project.

  4. 在開發人員命令提示字元主控台視窗中,輸入命令 cl /P arguments filename.cppIn the developer command prompt console window, enter the command cl /P arguments filename.cpp. 對於 arguments,請使用您上面所擷取的引數清單。For arguments, use the list of arguments you captured above. filename.cpp 是重現原始程式檔的名稱。filename.cpp is the name of your repro source file. 此命令會複寫用於重現的命令列,但在前置處理器通過後停止編譯。This command replicates the command line you used for the repro, but stops the compilation after the preprocessor pass. 接著,它會將前置處理過的原始程式碼寫入至 filename.iThen it writes the preprocessed source code to filename.i.

如果您要前置處理 C++/CX 原始程式碼檔案,或者要使用 C++ 模組功能,則需要執行一些其他步驟。If you're preprocessing a C++/CX source code file, or you're using the C++ Modules feature, some additional steps are required. 如需詳細資訊,請參閱以下節。For more information, see the sections below.

產生前置處理過的檔案之後,最好確定當您編譯前置處理過的檔案時,問題仍然會重現。After you've generated the preprocessed file, it's a good idea to make sure that the problem still repros when you compile the preprocessed file.

確認前置處理過的檔案仍然重現錯誤To confirm the preprocessed file still repros the error

  1. 在開發人員命令提示字元主控台視窗中,輸入 cl arguments /TP filename.i 命令,以告訴 cl.exe 將前置處理過的檔案編譯為 C++ 原始程式檔。In the developer command prompt console window, enter the command cl arguments /TP filename.i to tell cl.exe to compile the preprocessed file as a C++ source file. arguments 與上面所擷取的相同引數,但已移除任何 /D/I 引數。The arguments are the same arguments captured above, but with any /D and /I arguments removed. 這是因為它們已經包含在前置處理過的檔案中。That's because they've already been included in the preprocessed file. filename.i 是前置處理過的檔案的名稱。filename.i is the name of your preprocessed file.

  2. 請確認已重現問題。Confirm that the problem is reproduced.

最後,將前置處理過的重現 filename.i 附加到報表中。Finally, attach the preprocessed repro filename.i to your report.

前置處理過的 C++/CX WinRT/UWP 程式碼重現Preprocessed C++/CX WinRT/UWP code repros

如果您要使用 C++/CX 來建置可執行檔,必須執行一些額外步驟,才能建立和驗證前置處理過的重現。If you're using C++/CX to build your executable, there are some extra steps required to create and validate a preprocessed repro.

前置處理 C++/CX 原始程式碼To preprocess C++/CX source code

  1. 建立前置處理過的原始程式檔,如前置處理原始程式碼檔案中所述。Create a preprocessed source file as described in To preprocess a source code file.

  2. 搜尋產生的 filename.i 檔案中是否有 #using 指示詞。Search the generated filename.i file for #using directives.

  3. 製作所有參考檔案的清單。Make a list of all of the referenced files. 請排除任何 Windows*.winmd 檔案、platform.winmd 檔案和 mscorlib.dll。Leave out any Windows*.winmd files, platform.winmd files, and mscorlib.dll.

若要準備驗證前置處理過的檔案仍會重現問題,請:To prepare to validate that the preprocessed file still reproduces the problem,

  1. 為前置處理過的檔案建立新目錄,並將它複製到新目錄。Create a new directory for the preprocessed file and copy it to the new directory.

  2. #using 清單中的.winmd 檔案複製到新目錄。Copy the .winmd files from your #using list to the new directory.

  3. 在新目錄中建立空白的 vccorlib.h 檔案。Create an empty vccorlib.h file in the new directory.

  4. 編輯前置處理過的檔案,以移除 mscorlib.dll 的任何 #using 指示詞。Edit the preprocessed file to remove any #using directives for mscorlib.dll.

  5. 編輯前置處理過的檔案,將所有絕對路徑變更為複製之 .winmd 檔案的純檔名。Edit the preprocessed file to change any absolute paths to just the bare filenames for the copied .winmd files.

確認前置處理過的檔案仍會重現問題,如上所述。Confirm that the preprocessed file still reproduces the problem, as above.

前置處理過的 C++ 模組重現Preprocessed C++ Modules repros

如果您要使用 C++ 編譯器的模組功能,必須執行一些不同的步驟,才能建立和驗證前置處理過的重現。If you're using the Modules feature of the C++ compiler, there are some different steps required to create and validate a preprocessed repro.

前置處理使用模組的原始程式碼檔案To preprocess a source code file that uses a module

  1. 擷取用來建置重現的命令列引數,如回報命令列內容中所述。Capture the command-line arguments used to build your repro, as described in To report the contents of the command line.

  2. 開啟 開發人員命令提示字元,以符合用來建置專案的 Visual Studio 版本和組態架構。Open the Developer Command Prompt that matches the Visual Studio version and configuration architecture used to build your project.

  3. 切換至包含重現專案的目錄。Change to the directory that contains your repro project.

  4. 在開發人員命令提示字元主控台視窗中,輸入命令 cl /P arguments filename.cppIn the developer command prompt console window, enter the command cl /P arguments filename.cpp. arguments 是上面所擷取的引數,而 filename.cpp 是取用模組的原始程式檔的名稱。The arguments are the arguments captured above, and filename.cpp is the name of the source file that consumes the module.

  5. 切換至包含建置模組介面 ( .ifc 輸出) 所使用之重現專案的目錄。Change to the directory that contains the repro project that built the module interface (the .ifc output).

  6. 擷取用來建置模組介面的命令列引數。Capture the command-line arguments used to build your module interface.

  7. 在開發人員命令提示字元主控台視窗中,輸入命令 cl /P arguments modulename.ixxIn the developer command prompt console window, enter the command cl /P arguments modulename.ixx. arguments 是上面所擷取的引數,而 filename.cpp 是建立模組介面的檔案的名稱。The arguments are the arguments captured above, and modulename.ixx is the name of the file that creates the module interface.

產生前置處理過的檔案之後,最好確定當您使用前置處理過的檔案時,問題仍然會重現。After you've generated the preprocessed files, it's a good idea to make sure the problem still repros when you use the preprocessed file.

確認前置處理過的檔案仍然重現錯誤To confirm the preprocessed file still repros the error

  1. 在開發人員主控台視窗中,切換回包含您重現專案的目錄。In the developer console window, change back to the directory that contains your repro project.

  2. 如上所述輸入 cl arguments /TP filename.i 命令,以編譯前置處理過的檔案,就像它是 C++ 原始程式檔一樣。Enter the command cl arguments /TP filename.i as above, to compile the preprocessed file as if it were a C++ source file.

  3. 確認前置處理過的檔案仍會重現該問題。Confirm that the problem is still reproduced by the preprocessed file.

最後,將前置處理過的重現檔案 (filename.i 和 modulename.i) 以及 .ifc 輸出附加到您的報表。Finally, attach the preprocessed repro files (filename.i and modulename.i) along with the .ifc output to your report.

連結重現 是由連結器產生的目錄內容(由 連結 _ 重現 環境變數指定),或做為 /LINKREPRO連結器選項的引數。A link repro is the linker-generated contents of a directory, specified either by the link_repro environment variable, or as an argument to the /LINKREPRO linker option. 它包含的組建成品可以統一示範在連結時發生的問題。It contains build artifacts that collectively demonstrate a problem that occurs at link time. 例如涉及連結時產生程式碼 (LTCG) 的後端損毀或是連結器損毀。Examples include a backend crash involving Link-Time Code Generation (LTCG), or a linker crash. 這些組建成品是連結器輸入所需的構件,因此可以重現問題。These build artifacts are the ones needed as linker input so the problem can be reproduced. 使用此環境變數可以輕鬆地建立連結重現。A link repro can be created easily by using this environment variable. 它可啟用連結器的內建重現產生功能。It enables the linker's built-in repro generation capability.

  1. 擷取用來建置重現的命令列引數,如回報命令列內容中所述。Capture the command-line arguments used to build your repro, as described in To report the contents of the command line.

  2. 開啟 開發人員命令提示字元,以符合用來建置專案的 Visual Studio 版本和組態架構。Open the Developer Command Prompt that matches the Visual Studio version and configuration architecture used to build your project.

  3. 在開發人員命令提示字元主控台視窗中,切換至包含您重現專案的目錄。In the developer command prompt console window, change to the directory that contains your repro project.

  4. 輸入 mkdir linkrepro 來建立連結重現的目錄,名為 linkreproEnter mkdir linkrepro to create a directory named linkrepro for the link repro. 您可以使用不同的名稱來捕捉另一個連結重現。You can use a different name to capture another link repro.

  5. 輸入 set link_repro=linkrepro 命令,以便將 link_repro 環境變數設為您所建立的目錄。Enter the command set link_repro=linkrepro to set the link_repro environment variable to the directory you created. 如果您的組建是從不同的目錄執行,通常就是更複雜的專案,請改為將 連結 _ 重現 設定為連結重現目錄的完整路徑。If your build is run from a different directory, as is often the case for more complex projects, then set link_repro to the full path to your link repro directory instead.

  6. 若要在 Visual Studio 中建置重現專案,請在開發人員命令提示字元主控台視窗中輸入 devenv 命令。To build the repro project in Visual Studio, in the developer command prompt console window, enter the command devenv. 這確保 Visual Studio 可以看到 link_repro 環境變數的值。It ensures that the value of the link_repro environment variable is visible to Visual Studio. 若要在命令列中建置專案,請使用上面擷取的命令列引數來複製重現組建。To build the project at the command line, use the command-line arguments captured above to duplicate the repro build.

  7. 建置重現專案,並確認發生預期的問題。Build your repro project, and confirm that the expected problem has occurred.

  8. 如果您已經使用 Visual Studio 來執行建置,則請予以關閉。Close Visual Studio, if you used it to do the build.

  9. 在開發人員命令提示字元主控台視窗中,輸入 set link_repro= 命令,以清除 link_repro 環境變數。In the developer command prompt console window, enter the command set link_repro= to clear the link_repro environment variable.

最後,將整個 linkrepro 目錄壓縮成 .zip 檔案或類似檔案來封裝重現,並將其附加至您的報表。Finally, package the repro by compressing the entire linkrepro directory into a .zip file or similar, and attach it to your report.

/LINKREPRO 連結器選項與 連結 _ 重現 環境變數具有相同的效果。The /LINKREPRO linker option has the same effect as the link_repro environment variable. 您可以使用 /LINKREPROTARGET 選項來指定要針對產生的連結重現進行篩選的名稱。You can use the /LINKREPROTARGET option to specify the name to filter on for the generated link repro. 若要使用 /LINKREPROTARGET,您也必須指定 /out 連結器選項。To use /LINKREPROTARGET, you must also specify the /OUT linker option.

  1. 建立目錄來保存連結重現。Create a directory to hold the link repro. 我們將會參考您建立為 目錄路徑 的完整目錄路徑。We'll refer to the full directory path you create as directory-path. 如果路徑包含空格,請在路徑前後加上雙引號。Use double quotes around the path if it includes spaces.

  2. /LINKREPRO:directory 路徑 命令新增至連結器命令列。Add the /LINKREPRO:directory-path command to the linker command line. 在 Visual Studio 中,開啟專案的 [ 屬性頁 ] 對話方塊。In Visual Studio, open the Property Pages dialog for your project. 選取 [設定 屬性 > 連結器 > 命令列] 屬性頁。Select the Configuration Properties > Linker > Command Line property page. 然後,在 [其他選項] 方塊中輸入 /LINKREPRO:directory-path 選項。Then, enter the /LINKREPRO:directory-path option in the Additional Options box. 選取 [確定] 儲存您的變更。Choose OK to save your changes.

  3. 建置重現專案,並確認發生預期的問題。Build your repro project, and confirm that the expected problem has occurred.

最後,將整個 目錄路徑 連結重現目錄壓縮成 .zip 檔案或類似檔案來封裝重現,並將其附加至您的報表。Finally, package the repro by compressing the entire directory-path link repro directory into a .zip file or similar, and attach it to your report.

其他重現Other repros

如果您無法將問題減少為單一原始程式檔或前置處理過的重現,而且問題不需要連結重現,則我們可以調查 IDE 專案。If you can't reduce the problem to a single source file or preprocessed repro, and the problem doesn't require a link repro, we can investigate an IDE project. 所有如何建立良好重現的指引仍然適用:程式碼應該是最基本且獨立的。All the guidance on how to create a good repro still applies: The code ought to be minimal and self-contained. 我們的最新工具中應該會發生問題,而且如果相關,則問題應該不會出現在其他編譯器中。The problem should occur in our most recent tools, and if relevant, shouldn't be seen in other compilers.

將重現建立為最少 IDE 專案,然後將整個目錄結構壓縮成 .zip 檔案或類似檔案以進行封裝,並將其附加至報表。Create your repro as a minimal IDE project, then package it by compressing the entire directory structure into a .zip file or similar and attach it to your report.

報表的傳送方式Ways to send your report

有幾種不錯的方法可將您的報表送給我們。You have a couple of good ways to get your report to us. 您可以使用 Visual Studio 的內建 報表問題工具Visual Studio 開發人員社群 頁面。You can use Visual Studio's built-in Report a Problem Tool, or the Visual Studio Developer Community page. 此頁面底部也有一個 [產品意見反應] 按鈕。There's also a Product feedback button at the bottom of this page. 選擇取決於您是否要在 IDE 中使用內建的工具擷取螢幕擷取畫面及組織您的報表。The choice depends on whether you want to use the built-in tools in the IDE to capture screenshots and organize your report. 如果您不想,可以直接使用開發人員社群網站。If you prefer not to, you can use the Developer Community website directly.

注意

不論您如何提交報表,Microsoft 都會尊重您的隱私權。Regardless of how you submit your report, Microsoft respects your privacy. Microsoft 致力於遵循所有資料的隱私權法律和規定。Microsoft is committed to compliance with all data privacy laws and regulations. 如需我們如何處理您所傳送之資料的相關資訊,請參閱 Microsoft 隱私權聲明For information about how we treat the data that you send us, see the Microsoft Privacy Statement.

使用回報問題工具Use the Report a Problem tool

Visual Studio 中的 [回報問題] 工具是 Visual Studio 使用者用來回報問題的一種方式,只要按幾下滑鼠即可。The Report a Problem tool in Visual Studio is a way for Visual Studio users to report problems with just a few clicks. 它會跳出一個簡單的表單來傳送您所發現問題的詳細資訊。It pops up a simple form to send detailed information about the problem you've found. 接著,您可以提交報表,而且不需要離開 IDE。You can then submit your report without ever leaving the IDE.

從 IDE 透過 [回報問題] 工具回報問題簡單又方便。Reporting your problem through the Report a Problem tool is easy and convenient from the IDE. 您可以選擇 [快速啟動] 搜尋方塊旁的 [傳送意見反應] 圖示,從標題列存取這項工具。You can access it from the title bar by choosing the Send Feedback icon next to the Quick Launch search box. 或者,您 可以在 [ 說明 > 傳送意見 反應 > 報告] 問題 的功能表列上找到它。Or, you can find it on the menu bar in Help > Send Feedback > Report a Problem.

當您選擇回報問題時,請先在開發人員社群中搜尋是否有類似問題。When you choose to report a problem, first search the Developer Community for similar problems. 如果其他人之前回報過相關問題,請附議報表並新增留言,提出具體細節。In case your problem has been reported before, upvote the report and add comments with additional specifics. 如果您找不到類似問題,請選擇 Visual Studio 意見反應對話方塊底部的 [回報新問題] 按鈕,然後遵循這些步驟回報問題。If you don't see a similar problem, choose the Report new problem button at the bottom of the Visual Studio Feedback dialog and follow the steps to report your problem.

使用 Visual Studio 開發人員社群頁面Use the Visual Studio Developer Community pages

Visual Studio 開發人員社群頁面提供另一種方便的途徑,讓您回報 Visual Studio 和 C++ 編譯器、工具和程式庫的問題和尋找其解決方案。The Visual Studio Developer Community pages are another convenient way to report problems and find solutions for Visual Studio and the C++ compiler, tools, and libraries. 有特定的開發人員社群頁面適用于 Visual StudioVisual Studio for Mac.netc + +Azure DevOpsAzure DevOps ServerThere are specific Developer Community pages for Visual Studio, Visual Studio for Mac, .NET, C++, Azure DevOps, and Azure DevOps Server.

在 [社群] 索引標籤底下,每個頁面頂端的附近有一個搜尋方塊。Beneath the community tabs, near the top of each page, is a search box. 您可以用它來尋找回報類似您問題的文章。You can use it to find posts that report problems similar to yours. 您也許可以找到與您問題相關的解決方案或其他有用資訊。You may find a solution or other useful information related to your problem is already available. 如果其他人已經回報過相同的問題,請附議該報表並留言,而非建立新的問題回報。If someone has reported the same problem before, then upvote and comment on that report, rather than create a new problem report. 若要留言、投票或回報新問題,系統可能會要求您登入 Visual Studio 帳戶。To comment, vote, or report a new problem, you may be asked to sign in to your Visual Studio account. 第一次登入時,您必須同意將您設定檔的存取權授與開發人員社群應用程式。The first time you sign in, you'll have to agree to give the Developer Community app access to your profile.

針對 c + + 編譯器、連結器和其他工具和程式庫的問題,請先搜尋 c + + 開發人員社群 頁面。For issues with the C++ compiler, linker, and other tools and libraries, first search the C++ Developer Community page. 如果其他人未回報過您搜尋的問題,請選擇搜尋方塊旁的 [回報問題] 按鈕。If you search for your problem, and it hasn't been reported before, choose the Report a problem button next to the search box. 您可以包含您的重現程式碼和命令列、螢幕擷取畫面、相關討論的連結,及其他您認為相關且有用的任何資訊。You can include your repro code and command line, screenshots, links to related discussions, and any other information you think is relevant and useful.

提示

針對在 Visual Studio 中可能發現與 C++工具組無關的其他類型問題 (例如 UI 問題、損壞的 IDE 功能或常見當機),請使用 IDE 中的 [回報問題] 工具。For other kinds of problems you might find in Visual Studio that are unrelated to the C++ toolset (For example, UI issues, broken IDE functionality, or general crashes), use the Report a Problem tool in the IDE. 這是最佳選擇,因為該工具有螢幕擷取畫面功能,並且能夠記錄導致您所發現問題的 UI 動作。This is the best choice, due to its screenshot capabilities and its ability to record UI actions that lead to the problem you've found. 您也可以在 Visual Studio 開發人員社群 網站上查閱這類錯誤。These kinds of errors can also be looked up on the Visual Studio Developer Community site. 如需詳細資訊,請參閱如何回報 Visual Studio 的問題For more information, see How to report a problem with Visual Studio.

報表和隱私權Reports and privacy

根據預設,報表中的所有資訊以及任何留言和回覆都是公開顯示的All information in reports and any comments and replies are publicly visible by default. 一般來說,這是一項優點,因為它可讓整個社群查看問題、解決方案和其他使用者找到的因應措施。Normally, it's a benefit, because it allows the entire community to see the issues, solutions, and workarounds other users have found. 不過,如果您基於隱私權或智慧財產權理由擔心會讓您的資料或身分公開,則可使用其他選項。However, if you're concerned about making your data or identity public, for privacy or intellectual property reasons, you have options.

如果您擔心揭露您的身分,請建立新的 Microsoft 帳戶,這不會揭露關於您的任何詳細資料。If you're concerned about revealing your identity, create a new Microsoft account that doesn't disclose any details about you. 使用此帳戶來建立您的報表。Use this account to create your report.

請不要在公開的初始報表標題或內容中放置您想要保持私用的任何項目。Don't put anything you want to keep private in the title or content of the initial report, which is public. 但是,假設您會在個別的留言中私下傳送詳細資料。Instead, say that you'll send details privately in a separate comment. 為了確定您的報表會導向至適當的人員,請在問題報表的主題清單中包含 cppcompilerTo make sure that your report is directed to the right people, include cppcompiler in the topic list of your problem report. 建立問題報表後,現在就能夠指定誰可以查看您的回覆和附件。Once the problem report is created, it's now possible to specify who can see your replies and attachments.

建立私人資訊的問題報表To create a problem report for private information

  1. 在建立的報表中,選擇 [新增留言] 來建立您對問題的私人描述。In the report you created, choose Add comment to create your private description of the problem.

  2. 在回覆編輯器中,使用 [送出] 和 [取消] 按鈕下方的下拉式控制項來指定回覆的對象。In the reply editor, use the dropdown control below the Submit and Cancel buttons to specify the audience for your reply. 只有您指定的人員才能看到這些私人回覆以及其中包含的任何影像、連結或程式碼。Only the people you specify can see these private replies and any images, links, or code you include in them. 選擇 [可供仲裁者和原始貼文者檢視] 來限制 Microsoft 員工和您自己的可見性。Choose Viewable by moderators and the original poster to limit visibility to Microsoft employees and yourself.

  3. 新增描述,以及重現所需的任何其他資訊、影像和檔案附件。Add the description and any other information, images, and file attachments needed for your repro. 選擇 [送出] 按鈕以私下傳送這些資訊。Choose the Submit button to send this information privately.

    附加的檔案有 2GB 的限制,最多 10 個檔案。There's a 2GB limit on attached files, and a maximum of 10 files. 對於任何較大的上傳項目,請在您的私人留言中要求一個上傳 URL。For any larger uploads, request an upload URL in your private comment.

這個留言底下的所有回覆都具有您指定的相同受限可見性。Any replies under this comment have the same restricted visibility you specified. 即使回覆的下拉式控制項未正確顯示受限可見性狀態也是如此。It's true even if the dropdown control on replies doesn't show the restricted visibility status correctly.

若要維護您的隱私權,並讓機密資訊不要公開檢視,請小心。To maintain your privacy and keep your sensitive information out of public view, be careful. 將所有與 Microsoft 的互動保持在這個受限留言下回覆。Keep all interaction with Microsoft to replies under the restricted comment. 對其他留言的回覆可能會導致您不小心公開機密資訊。Replies to other comments may cause you to accidentally disclose sensitive information.

如何回報 C++ 文件問題How to report a C++ documentation issue

我們使用 GitHub 問題來追蹤文件中所回報的問題。We use GitHub issues to track problems reported in our documentation. 您現在可以直接從內容頁建立 GitHub 問題,這可讓您以更豐富的方式與作者和產品小組互動。You can now create GitHub issues directly from a content page, which enables you interact in a much richer way with writers and product teams. 如果您發現文件問題、錯誤的程式碼範例、造成混淆的說明、嚴重遺漏,或甚至只是錯字,,都可以輕鬆地通知我們。If you see an issue with a document, a bad code sample, a confusing explanation, a critical omission, or even just a typo, you can easily let us know. 請捲動至頁面底部,並選取 [登入以提供文件應見反應]。Scroll to the bottom of the page and select Sign in to give documentation feedback. 若您還沒有 GitHub 帳戶,您需要建立一個。You'll need to create a GitHub account if you don't have one already. 當您有 GitHub 帳戶時,您可以看到所有我們的文件問題及其狀態。When you have a GitHub account, you can see all of our documentation issues and their status. 當您所回報的問題變更時,也會收到通知。You also get notifications when changes are made for the issue you reported. 如需詳細資訊,請參閱即將在 docs.microsoft.com 推出新的意見反應系統For more information, see A New Feedback System Is Coming to docs.microsoft.com.

當您使用文件的 [意見反應] 按鈕時,您可以在 GitHub 上建立文件問題。You create a documentation issue on GitHub when you use the documentation feedback button. 該問題會自動填入有關建立問題來源頁面的一些資訊。The issue is automatically filled in with some information about the page you created the issue on. 這是我們知道問題所在位置的方式,因此請勿編輯這項資訊。That's how we know where the problem is located, so don't edit this information. 只需要附加有關錯誤的詳細資料,如有必要,還可以提供建議的修正。Just append the details about what's wrong, and if you like, a suggested fix. 我們的 C++ 文件是開放原始碼,因此,如果您可以自行提交修正。Our C++ docs are open source, so if you'd like to submit a fix yourself, you can. 如需您可以如何參與文件的詳細資訊,請參閱我們在 GitHub 上的參與指南 (英文)。For more information about how you can contribute to our documentation, see our Contributing guide on GitHub.