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

Function test_nodebug

tests/debugpy/test_run.py:110–135  ·  view source on GitHub ↗
(pyfile, run, target)

Source from the content-addressed store, hash-verified

108@pytest.mark.parametrize("run", runners.all_launch)
109@pytest.mark.parametrize("target", targets.all)
110def test_nodebug(pyfile, run, target):
111 @pyfile
112 def code_to_debug():
113 import debuggee
114 from debuggee import backchannel
115
116 debuggee.setup()
117 backchannel.receive() # @ bp1
118 print("ok") # @ bp2
119
120 with debug.Session() as session:
121 session.config["noDebug"] = True
122 session.config["redirectOutput"] = True
123
124 backchannel = session.open_backchannel()
125 run(session, target(code_to_debug))
126
127 with pytest.raises(messaging.MessageHandlingError):
128 session.set_breakpoints(code_to_debug, all)
129
130 backchannel.send(None)
131
132 # Breakpoint shouldn't be hit.
133 pass
134
135 assert "ok" in session.output("stdout")
136
137
138@pytest.mark.skipif(sys.platform == "win32", reason="sudo not available on Windows")

Callers

nothing calls this directly

Calls 6

open_backchannelMethod · 0.80
set_breakpointsMethod · 0.80
outputMethod · 0.80
runFunction · 0.70
targetFunction · 0.70
sendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…