MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / request_load_source

Method request_load_source

_pydevd_bundle/pydevd_api.py:782–798  ·  view source on GitHub ↗

:param str filename: Note: must be sent as it was received in the protocol. It may be translated in this function.

(self, py_db, seq, filename)

Source from the content-addressed store, hash-verified

780 py_db.post_internal_command(int_cmd, thread_id)
781
782 def request_load_source(self, py_db, seq, filename):
783 """
784 :param str filename:
785 Note: must be sent as it was received in the protocol. It may be translated in this
786 function.
787 """
788 try:
789 filename = self.filename_to_server(filename)
790 assert filename.__class__ == str # i.e.: bytes on py2 and str on py3
791
792 with tokenize.open(filename) as stream:
793 source = stream.read()
794 cmd = py_db.cmd_factory.make_load_source_message(seq, source)
795 except:
796 cmd = py_db.cmd_factory.make_error_message(seq, get_exception_traceback_str())
797
798 py_db.writer.add_command(cmd)
799
800 def get_decompiled_source_from_frame_id(self, py_db, frame_id):
801 """

Callers 1

_load_sourceMethod · 0.80

Calls 6

filename_to_serverMethod · 0.95
make_error_messageMethod · 0.80
readMethod · 0.45
add_commandMethod · 0.45

Tested by

no test coverage detected