microsoft / microsoft/vscode-cpptools

C++ debugging on macOS gets stuck with message "Unrecognized format of field "msg" in result"

Open
#2,492 5 comments 0 reactions 1 assignee View on GitHub

@pieandcakes is already working on this.

Since Sep 7, 2018.

debugger
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Hello,

I am occasionally using VSCode and the Microsoft C++ extension for MongoDB server development on macOS. When I try to debug any of the produced binaries (which are compiled with debugging information enabled and no optimizations), the debugger just gets stuck and the process remains stuck in unkillable state.

OS version: macOS 10.13.6
VS Code Version: 1.27.1
C/C++ Extension Version: 0.18.1

My debugger configuration looks like this:

        {
            "name": "(lldb) Generic run",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/ninja/mongo/db/s/collection_sharding_runtime_test",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": true,
            "MIMode": "lldb"
        }

When I start this debugger configuration with breakpoint enabled, I am able to step through the code successfully, up to a point when an exception gets thrown at which case the debugger gets stuck and the following messages is printed on the console:

...
Loaded '/Users/kaloianm/workspace/mongo/build/ninja/mongo/db/s/collection_sharding_runtime_test'. Symbols loaded.
Execute debugger commands using "-exec <command>", for example "-exec info registers" will list registers in use (when GDB is the debugger)
ERROR: Exception while processing MIEngine operation. Unrecognized format of field "msg" in result: result-class: error
message: error: Failed to halt process: Process is not running. If the problem continues restart debugging.

What I noticed is that from the 4 threads that are in the process, one remains in the PAUSED mode and I can inspect its stack. The other 3 are unpausable and unkillable.

Let me know if I can provide any additional information to help debug this.

-Kal.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.