Skip to content

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

@kaloianm

Description

@kaloianm

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions