Skip to content

Trouble getting import debugging info from pyright CLI #10895

@djacobowitz-aur

Description

@djacobowitz-aur

Describe the bug

I tried debugging an import path problem with my project and had some difficulty getting debug info about what was happening.

(A) pyright --verbose does not print the verbose trace of import behavior which is recommended for debugging import issues. This happens because the import logging uses console.log level. --verbose sets the max log level to Info instead of Log. VS Code gets the import logging anyway, maybe because StderrConsole doesn't pay attention to the level.

(B) Fewer of the import details are logged on master since #10819. E.g. _resolveImportStrict still contains log statements but is never passed the importLogger.

VS Code extension or command-line
Are you running pyright as a VS Code extension, a language server in another editor, integrated into Pylance, or the command-line tool? Which version?

Command line built from master today.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions