Skip to content

Does not work out of the box when debugging BasicObject #624

@jabamaus

Description

@jabamaus

Your environment

ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x64-mingw-ucrt]
rdbg 1.5.0
vscode 1.66 vscode-rdbg 0.0.10

Describe the bug
rdbg crashes if user tries to inspect a BasicObject (only tested through vscode so I don't know about other paths).

In particular calls to obj.instance_variables and obj.class fail because BasicObject does not have these methods by default.

To Reproduce
Inspect a BasicObject in variable window in vscode

Expected behavior
I would expect to not have to add 'instance_variables' and 'class' method to my BasicObject, or to have this requirement documented (preferably the former). Ideally calls to these methods should be handled safely like inspect, but maybe without printing a large exception message in variables window.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions