← 返回首页
C/C++ extension logging

Documentation

Topics Overview Overview Tutorial Intro Videos Agents Editor Overview Quickstart Staging & Committing Branches & Worktrees Repositories & Remotes Merge Conflicts Collaborate on GitHub Troubleshooting FAQ Get Started Terminal Basics Terminal Profiles Shell Integration Appearance Advanced Debugging Debug Configuration Tasks Testing Integrated Browser Port Forwarding Guides & Tutorials     Test-Driven Development     Test Web Apps with Browser Tools Overview Enterprise Policies AI Settings Extensions Telemetry Updates Overview VS Code for the Web SSH SSH Tutorial Tunnels Dev Containers WSL WSL Tutorial GitHub Codespaces VS Code Server Linux Prerequisites Tips and Tricks FAQ GitHub Copilot Setup Linux macOS Windows Raspberry Pi Network Portable Mode Additional Components Uninstall Languages & Runtimes Extension Docs
Copy as Markdown

On this page there are 4 sections

C/C++ extension logging

Logging information is available for the language server and the debug adapter. If you are experiencing a problem that we are unable to diagnose based on information in your issue report, we might ask you to enable logging and send us your logs.

Logging information is delivered directly to the Output panel for the language server and to the Debug Console for the debug adapter.

Enable logging for the language server

To turn on full logging for the language server, follow these steps:

  1. Open the Command Palette and choose Preferences: Workspace settings.

  2. Search for "logging" in the search box.

  3. Find C_Cpp: Logging Level and change the level to Debug.

  4. From the main menu, open the Output panel by choosing View > Output.

  5. Select the C/C++ option in the log filter selector:

Enable logging for the debug adapter

Enabling logging for the debug adapter will show communication information between VS Code and our extension and between our extension and the debug adapter.

Logging configuration for the debug adapter is configured in launch.json.

Logging for LLDB-MI debuggers

The logging block for macOS LLDB-MI debuggers, along with its default configuration, is in launch.json:

"logging": { "engineLogging": false }

The Visual C++ debugger logging will show only the communication to and from VS Code as all communication to the debugger is done internally to the process and is not visible through logging.