Skip to content

Hook on module names #1871

@SirJoeth3rd

Description

@SirJoeth3rd

I've got a very unique setup. The python process I want sits on a remote server but the modules are retrieved from a tree based structure in a database. So the file parameter of the module object will look like this "[context]/[modulename]". We've got the python files in a local repository and we use pipelines to recon these files with those stored in the database.

So getting to the problem, I can attach to the debugger process perfectly well but the module names are sending through as "[context]/[modulename]" if I can add a hook in somewhere to remove the [context] then our team's pycharm/vscode will be able to pick up the file being debugged.

Before I do a deep dive into the debugpy codebase I think some advice would save me a lot of time. Can I provide a custom Pdb class for the debugger? Is there a natural point in debugpy where I could insert such a hook?

Thank you.

Metadata

Metadata

Assignees

Labels

needs reproIssue has not been reproduced yet

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions