Skip to content

Configurable debug Inline info #125632

@fariasfc

Description

@fariasfc

VSCode is a really awesome tool, thanks!

I was wondering if it was possible to have more information on inline debug. For instance, if the specific line has a torch.Tensor, it would be useful to have its .shape. This would be even better if we could have a way to configure what we want to visualize inline.

(I don't know exactly how the inline debugging is handled, but if we had a function that receives the current variable and we return a string with what we expect to see, it would be great!)

def debug_inline(current_variable):
    if type(current_variable) == torch.Tensor:
       return f"shape: {current_variable.shape}, values: {current_variable}"
    else:
        return repr(current_variable)

Metadata

Metadata

Assignees

Labels

debugDebug viewlet, configurations, breakpoints, adapter issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions