eS/ SrSSKrSSKrSSKJr SrSqSr0r0r 0r 0r Sr Sr "SS 5r"S S 5rS r"S S5r"SS5r"SS5r"SS5r"SS5rSrSrSrSr\S:XaSSKJr \"SSSS 9 gg)!aSupport for remote Python debugging. Some ASCII art to describe the structure: IN PYTHON SUBPROCESS # IN IDLE PROCESS # # oid='gui_adapter' +----------+ # +------------+ +-----+ | GUIProxy |--remote#call-->| GUIAdapter |--calls-->| GUI | +-----+--calls-->+----------+ # +------------+ +-----+ | Idb | # / +-----+<-calls--+------------+ # +----------+<--calls-/ | IdbAdapter |<--remote#call--| IdbProxy | +------------+ # +----------+ oid='idb_adapter' # The purpose of the Proxy and Adapter classes is to translate certain arguments and return values that cannot be transported through the RPC barrier, in particular frame and traceback objects. N)debugger idb_adapter gui_adapterc.[U5nU[U'U$N)id frametable)framefids 8/opt/imh/python3.13/lib/python3.13/idlelib/debugger_r.py wrap_framer (s U)CJsO JcUcgUSn[U[R5(de[U5nU[U'USUSU4nU$)z0replace info[2], a traceback instance, by its IDNr) isinstancetypes TracebackTypertracebacktable)info traceback traceback_id modified_infos r wrap_infor-sY |G )U%8%89999)} '0|$a$q'<8 rc$\rSrSrSrSSjrSrg)GUIProxy9cXlX lgrconnoid)selfr gui_adap_oids r __init__GUIProxy.__init__;s  rNc ~URRURSU[U5[ U5405 g)N interaction)r remotecallr!r r)r"messager rs r r'GUIProxy.interaction?s4 TXX}%z%'8)D/J !rrr__name__ __module__ __qualname____firstlineno__r$r'__static_attributes__rr rr9s  !rrc\rSrSrSrSrSrSrSrSr Sr S r S r S r S rS rSrSrSrSrSrSrSrSrSrg) IdbAdapterFcXlgridb)r"r7s r r$IdbAdapter.__init__Hsrc8URR5 gr)r7set_stepr"s r r:IdbAdapter.set_stepM rc8URR5 gr)r7set_quitr;s r r?IdbAdapter.set_quitPr=rc8URR5 gr)r7 set_continuer;s r rBIdbAdapter.set_continueSs rcL[UnURRU5 gr)r r7set_nextr"r r s r rEIdbAdapter.set_nextVs3 % rcL[UnURRU5 gr)r r7 set_returnrFs r rIIdbAdapter.set_returnZs3 E"rc[UnUcSnO [UnURRX45upVUVVs/sHupx[ U5U4PM nnnXV4$s snnfr)r rr7 get_stackr ) r"r tbidr tbstackiframe2ks r rLIdbAdapter.get_stack^sb3 <B%B88%%e0:?@%YV*V$a(%@xAsAcVSSKnURRXR5 g)Nr)__main__r7run__dict__)r"cmdrUs r rVIdbAdapter.runhs  S++,rc<URRX5nU$r)r7 set_breakr"filenamelinenomsgs r r[IdbAdapter.set_breaklshh  2 rc<URRX5nU$r)r7 clear_breakr\s r rbIdbAdapter.clear_breakpshh""84 rc<URRU5nU$r)r7clear_all_file_breaksr"r]r_s r re IdbAdapter.clear_all_file_breakstshh,,X6 rc*[Un[X25$r)r getattr)r"r namer s r frame_attrIdbAdapter.frame_attrzs3u##rcX[UnURn[U5nU[U'U$r)r f_globalsr dicttable)r"r r gdictdids r frame_globalsIdbAdapter.frame_globals~s+3i # rcX[UnURn[U5nU[U'U$r)r f_localsrro)r"r r ldictrqs r frame_localsIdbAdapter.frame_localss+3i # rcX[UnURn[U5nU[U'U$r)r f_coder codetable)r"r r codecids r frame_codeIdbAdapter.frame_codes+3||h # rc,[UnUR$r)r{co_namer"r}r|s r code_nameIdbAdapter.code_names~||rc,[UnUR$r)r{ co_filenamers r code_filenameIdbAdapter.code_filenames~rc[S5e)Nz"dict_keys not public or pickleable)NotImplementedErrorr"rqs r dict_keysIdbAdapter.dict_keyss!"FGGrcB[[UR55$r)listrokeysrs r dict_keys_listIdbAdapter.dict_keys_listsIcN'')**rcF[UUn[R"U5$r)roreprlibrepr)r"rqkeyvalues r dict_itemIdbAdapter.dict_items#s#||E""rr6N)r,r-r.r/r$r:r?rBrErIrLrVr[rbrerkrrrwr~rrrrrr0r1rr r3r3Fsg  !#- $ H+#rr3c[X5n[R"U5n[U5nUR [ U5 [ $)adStart the debugger and its RPC link in the Python subprocess Start the subprocess side of the split debugger and set up that side of the RPC link by instantiating the GUIProxy, Idb debugger, and IdbAdapter objects and linking them together. Register the IdbAdapter with the RPCServer to handle RPC requests from the split debugger GUI via the IdbProxy. )rrIdbr3register idb_adap_oid) rpchandlerr# gui_proxyr7idb_adaps r start_debuggerrs;2I ,,y !C#H h/ rc8\rSrSrSrSrSrSrSrSr Sr g ) FrameProxyc8XlX lSUl0Ulg)Nr)_conn_fid_oid _dictcache)r"r r s r r$FrameProxy.__init__s  ! rcUSSS:Xa [U5eUS:XaUR5$US:XaUR5$US:XaUR5$URR UR SURU405$)Nr_rzrnrurk)AttributeError _get_f_code_get_f_globals _get_f_localsrr(rrr"rjs r __getattr__FrameProxy.__getattr__s 8s? & & 8 ##% % ; &&( ( : %%' 'zz$$TYY &*ii%6<   +  "*,rrcURSS[405q[X[5n[R "X5n[ X5nUR[U5 U$)a=Start the subprocess debugger, initialize the debugger GUI and RPC link Request the RPCServer start the Python subprocess debugger and link. Set up the Idle side of the split debugger by instantiating the IdbProxy, debugger GUI, and debugger GUIAdapter objects and linking them together. Register the GUIAdapter with the RPCClient to handle debugger GUI interaction requests coming from the subprocess debugger via the GUIProxy. The IdbAdapter will pass execution and environment requests coming from the Idle debugger GUI to the subprocess debugger via the IdbProxy. execstart_the_debugger)r(r#rrrDebuggerrr)rpccltpyshell idb_proxyrgui_adaps r start_remote_debuggerrWsY $$V-A$0?B8L,7I   G /C&&H OOL(+ JrcD[U5 UR[5 g)aIShut down subprocess debugger and Idle side of debugger RPC link Request that the RPCServer shut down the subprocess debugger and link. Unregister the GUIAdapter, which will cause a GC on the Idle process debugger and RPC link objects. (The second reference to the debugger GUI is deleted in pyshell.close_remote_debugger().) N)close_subprocess_debugger unregisterr#r s r close_remote_debuggerrosf% l#rc6URSS[405 g)Nrstop_the_debugger)r(rrs r rr{s f1L?BGrcXURSS[405nU[:XdS5eg)Nrrz Idb restarted with different oid)r(r#r)r idb_adap_oid_rets r restart_subprocess_debuggerr~s3((1E*6"> | +O-OO +rrU)mainz!idlelib.idle_test.test_debugger_rrF) verbosityexit)__doc__rridlelibr debuggingrr#r ror{rr rrr3rrrrrrrrrrr,unittestrr1rr r s*         ! !e#e#T,''T ; ; ##0 < <11f0 $HP  z ,Fr