Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Generate ModuleEvent #22

Closed
karthiknadig opened this issue Jan 24, 2018 · 3 comments
Closed

Generate ModuleEvent #22

karthiknadig opened this issue Jan 24, 2018 · 3 comments
Assignees
Milestone

Comments

@karthiknadig
Copy link
Member

Generate moduleEvent on import, reload, and del.

@int19h
Copy link
Contributor

int19h commented Jan 24, 2018

So we are only going to report the stuff in sys.modules as modules?

@karthiknadig
Copy link
Member Author

I thank that is a good first implementation. We can consider more rigorous module tracking later.

@int19h
Copy link
Contributor

int19h commented Jan 24, 2018

It's more a question of what is a module, in general. Our existing ptvsd implementation treats any .py file (more generally, co_filename of the code object) as a module - and only uses sys.modules as a means to populate the initial list, for the lack of better alternatives. If we're changing to tracking sys.modules exclusively, that would be a user-visible semantics change.

OTOH, with existing VS debugger as a baseline, we don't need to accurately track modules as they get loaded (because it doesn't). We just need to make sure that everything that we report that has an associated module ID - in particular, stack frames - has the corresponding module entry. This means that one possible implementation is to do no tracking at all, but instead report module as loaded when it's first seen in a stack trace, which is probably much easier.

@int19h int19h added this to the VS stable milestone Mar 21, 2018
@karthiknadig karthiknadig self-assigned this Mar 22, 2018
@karthiknadig karthiknadig mentioned this issue Mar 22, 2018
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants