You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Is it possible to start debugger on a specific line? #120
I'm trying to invoke pdb (for step-by step debugging and altering some variables) at specific line without editing the source code. The code fragment looks like this:
def __init__(...
):
"""
A docstring
"""
self.parent_loader = None #### TARGET LINE (253) ####
self.inject_globals = {}
self.pack = {} if pack is None else pack
for i in self.pack:
if isinstance(self.pack[i], salt.loader.context.NamedLoaderContext):
self.pack[i] = self.pack[i].value()
if opts is None:
opts = {}
opts = copy.deepcopy(opts)
But the debugger gets invoked in stdlib inside of the next (nearest) call:
Activity
ionelmc commentedon Dec 6, 2023
Yes, it is, because tracing in general is post-facto, the action will be called after the code being traced has been executed.
Is there a specific problem you're trying to solve there? Seems like you could give more context...
max-arnold commentedon Dec 6, 2023
I'm trying to invoke pdb (for step-by step debugging and altering some variables) at specific line without editing the source code. The code fragment looks like this:
But the debugger gets invoked in stdlib inside of the next (nearest) call: