MCPcopy Create free account
hub / github.com/microsoft/debugpy / test_crossfile_breakpoint

Function test_crossfile_breakpoint

tests/debugpy/test_breakpoints.py:104–132  ·  view source on GitHub ↗
(pyfile, target, run)

Source from the content-addressed store, hash-verified

102
103
104def test_crossfile_breakpoint(pyfile, target, run):
105 @pyfile
106 def script1():
107 import debuggee
108
109 debuggee.setup()
110
111 def do_something():
112 print("do something") # @bp
113
114 @pyfile
115 def script2():
116 import debuggee
117 import script1
118
119 debuggee.setup()
120 script1.do_something() # @bp
121 print("Done")
122
123 with debug.Session() as session:
124 with run(session, target(script2)):
125 session.set_breakpoints(script1, all)
126 session.set_breakpoints(script2, all)
127
128 session.wait_for_stop(expected_frames=[some.dap.frame(script2, line="bp")])
129 session.request_continue()
130
131 session.wait_for_stop(expected_frames=[some.dap.frame(script1, line="bp")])
132 session.request_continue()
133
134
135# NameError in condition is a special case: pydevd is configured to skip traceback for

Callers

nothing calls this directly

Calls 5

set_breakpointsMethod · 0.80
wait_for_stopMethod · 0.80
request_continueMethod · 0.80
runFunction · 0.70
targetFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…