Wayback Machine
55 captures
29 Jul 2019 - 29 Jan 2026
Mar APR May
16
2019 2020 2021
success
fail
About this capture
COLLECTED BY
Collection: Outlinks From Tweets
TIMESTAMPS
loading
The Wayback Machine - https://web.archive.org/web/20200416225032/https://code.visualstudio.com/docs/cpp/enable-logging-cpp
This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use. Learn more
Skip to content 
Visual Studio Code
  • Docs
  • Updates
  • Blog
  • API
  • Extensions
  • FAQ
  • Search
  • Search Search
  • Download VS Code Download VS Code Download

Version 1.44 is now available! Read about the new features and fixes from March.

Dismiss this update
'; document.body.appendChild(div.children[0]); }
  • Overview
  • Setup
    • Overview
    • Linux
    • macOS
    • Windows
    • Network
    • Additional Components
  • Get Started
    • Intro Videos
    • Tips and Tricks
    • User Interface
    • Themes
    • Settings
    • Key Bindings
    • Display Language
    • Telemetry
  • User Guide
    • Basic Editing
    • Extension Marketplace
    • IntelliSense
    • Code Navigation
    • Refactoring
    • Debugging
    • Version Control
    • Integrated Terminal
    • Tasks
    • Settings Sync
    • Snippets
    • Emmet
    • Command Line
    • Multi-root Workspaces
    • Accessibility
  • Languages
    • Overview
    • JavaScript
    • JSON
    • HTML
    • CSS, SCSS and Less
    • TypeScript
    • Markdown
    • PowerShell
    • C++
    • Java
    • PHP
    • Python
    • Go
    • T-SQL
    • C#
    • .NET Core
  • Node.js / JavaScript
    • Working with JavaScript
    • Node.js Tutorial
    • Node.js Debugging
    • Node.js Deployment
    • React Tutorial
    • Angular Tutorial
    • Vue Tutorial
    • Ember Tutorial
    • Debugging Recipes
    • Extensions
  • TypeScript
    • Tutorial
    • Compiling
    • Debugging
  • Python
    • Tutorial
    • Editing Code
    • Linting
    • Debugging
    • Environments
    • Testing
    • Jupyter Notebook Support
    • Python Interactive
    • Data Science Tutorial
    • Django Tutorial
    • Flask Tutorial
    • Create containers
    • Python on Azure
    • Settings Reference
  • Java
    • Getting Started
    • Navigate and Edit
    • Refactoring
    • Linting
    • Project Management
    • Build Tools
    • Run and Debug
    • Testing
    • Spring Boot
    • Application Servers
    • Java on Azure
    • Extensions
    • FAQ
  • C++
    • GCC on Windows
    • Microsoft C++
    • GCC on Linux
    • GCC on Windows Subsystem for Linux
    • Clang on macOS
    • Debugging
    • Editing
    • Settings
    • Enhanced colorization
    • c_cpp_properties.json
    • Debug configuration
    • Natvis framework
    • Pipe transport
    • Logging
    • FAQ
  • Containers
    • Overview
    • Node.js
    • Python
    • ASP.NET Core
    • Debug
    • Registries
    • Deploy to Azure
    • Choose a dev environment
    • Customize
  • Azure
    • Extensions
    • Deployment
    • Remote Debugging for Node.js
    • Docker
    • MongoDB
    • Kubernetes
    • Try Azure App Service
  • Remote
    • Overview
    • SSH
    • Containers
    • Visual Studio Online
    • Windows Subsystem for Linux
    • Tutorials
    • Tips and Tricks
    • Advanced Containers
    • Linux Prerequisites
    • FAQ

Topics

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.

    Logging level

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

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

    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 MI debuggers

The logging block for MI debuggers with its default configuration in launch.json is as follows:

"logging": {
    "trace": false,
    "traceResponse": false,
    "engineLogging": false
}

VS Code and the CppTools extension

The logging here is called trace logging and can be enabled by setting trace and traceResponse to true in the logging block inside launch.json. This will help diagnose issues related to VS Code's communication to our extension and our responses.

CppTools extension and the debugger

The logging between CppTools and the debugger is called engineLogging. When using an MI debugger such as gdb or lldb, this will show the request, response, and events using the mi interpreter. This logging will help us determine whether the debugger is receiving the right commands and generating the correct responses.

Logging for Visual C++ debugger

The logging block for the Visual C++ debugger with its default configuration in launch.json is as follows:

"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.

07/25/2019

In this article there are 4 sectionsIn this article

  • Enable logging for the language server
  • Enable logging for the debug adapter
  • VS Code and the CppTools extension
  • Logging for Visual C++ debugger
  • Hello from Seattle.
  • Follow @code
  • Support
  • Privacy
  • Terms of Use
  • License
Microsoft homepage Microsoft homepage © 2020 Microsoft