eQSrSSKrSSKrSSK7 SSKJrJr SSKJr SSK J r SSK J r "SS \R5rS rS r"S S 5r"SS\ 5r"SS5r\S:XaSSKJr \"SSSS9 gg)aDebug user code with a GUI interface to a subclass of bdb.Bdb. The Idb idb and Debugger gui instances each need a reference to each other or to an rpc proxy for each other. If IDLE is started with '-n', so that user code and idb both run in the IDLE process, Debugger is called without an idb. Debugger.__init__ calls Idb with its incomplete self. Idb.__init__ stores gui and gui then stores idb. If IDLE is started normally, so that user code executes in a separate process, debugger_r.start_remote_debugger is called, executing in the IDLE process. It calls 'start the debugger' in the remote process, which calls Idb with a gui proxy. Then Debugger is called in the IDLE for more. N)*)Frame Scrollbar)macosx) ScrolledList)ListedToplevelc8^\rSrSrSrU4SjrSrSrSrU=r $)Idbz6Supply user_line and user_exception functions for Bdb.c.>Xl[TU] 5 gN)guisuper__init__)selfr __class__s 6/opt/imh/python3.13/lib/python3.13/idlelib/debugger.pyr Idb.__init__ s c[U5(aUR5 g[U5nURR X!5 g![ a gf=f)z]Handle a user stopping or breaking at a line. Convert frame to a string and send it to gui. N) _in_rpc_codeset_step_frame2messager interactionTclError)rframemessages r user_line Idb.user_line$sN    MMO  '  HH  0   sA AAc[U5(aUR5 g[U5nURR X1U5 g)z)Handle an the occurrence of an exception.N)rrrrr)rrexc_infors ruser_exceptionIdb.user_exception2s7    MMO  ' WX6r)r) __name__ __module__ __qualname____firstlineno____doc__rrr"__static_attributes__ __classcell__)rs@rr r s< 77rr cURRRS5(agURnUcgURRnSU;aSU;ag[ U5$)z)Determine if debugger is within RPC code.zrpc.pyTFidlelibdebugger)f_code co_filenamecountf_backr)r prev_frame prev_names rrr:sb ||%%h//\\  %%11  !jI&=J''rcURnURnURn[RR U5nUSU3nUR S:waUSUR S3nU$)z"Return a message string for frame.:?: z())r.r/f_linenoospathbasenameco_name)rcodefilenamelinenor;rs rrrIsj <TR"T6$r )run)argsrsrDebugger.run..s 4rNTF)rH abort_looprootafterrGrErM)rrNs``rrM Debugger.runusa>    ! OO  IIOOC!8 9  %#D 88<<&$D uD s A-- A6cjUR5 UR(aURR 5 gUR (a!UR R 5 SUlURR5 URR5 g![a Nf=f)zClose the debugger and window.N) quit ExceptionrGtopbell stackviewercloserDclose_debuggerdestroyrevents rr[Debugger.closes  IIK    HHMMO        " " $d&6 ##%    sB%% B21B2c URnURUlUR=Uln[U5=UlnURR S5 URR S5 URSUR5 URRSUR5 [U5=Ul nURRSS9 /=Ul n[USURS9=UlnUR#U5 [US UR$S9=UlnUR#U5 [US UR(S9=UlnUR#U5 [US UR,S9=UlnUR#U5 [US UR0S9=UlnUR#U5 UH!nUR3S S9 URSS9 M# [U5=UlnUR4RSS9 UR6(d5[9U5UR:lUR6R=S5 [?USUR@UR6S9Ul!URBRESSS9 URF(d[9U5UR:l#[?USURHURFS9Ul%URJRESSS9 URL(d5[9U5UR:l&URLR=S5 [?USURNURLS9Ul(URPRESSS9 URR(d[9U5UR:l)[?USURTURRS9Ul+URVRESSS9 [YUSS9Ul-URZRSS9 [YUSS9Ul.UR\RSSS9 UR\R_S5Ul0[USS9Ul1URbRSSS9 [U5Ul2URdRSSS9 [USS9Ul3URfRSSS9 UR6Ri5(aURA5 URLRi5(aURO5 URRRi5(aURU5 gg) z$Draw the debugger gui on the screen.z Debug ControlDebugWM_DELETE_WINDOWzw)anchorGo)textcommandStepOverOutQuitdisabledstateleft)sideStack)rgrhvariablerrowcolumnSourceLocalsGlobalsx)refill background)heightbothexpandr|N)5rDflistrRrrXwm_title wm_iconname wm_protocolr[bindrbframepackbuttonsButtoncontbcontappendstepbstepnextbnextretbretrV configurecframevstack BooleanVarrset Checkbutton show_stackbstackgridvsource show_sourcebsourcevlocals show_localsblocalsvglobals show_globalsbglobalsLabelstatuserrorcgeterrorbgfstackflocalsfglobalsget)rrDrRrXrblbrs rrFDebugger.make_guis1,,]] "<<' D'--3 /* W% *DJJ7  j$**-$Sz) f $ rT499EE Q ! VTYYGG Q ! VTYYGG Q ! vE488DD A ! vFDIIFF A ! A KKjK ) FFF  %V}, f f%{{$.sODNN ! KKOOA !&$//DKKI  Qq)||%/_DNN ""64#3#3dllL  a*||%/_DNN " LL  Q "64#3#3dllL  a*}}&0oDNN ##FD$5$5 O  q+C,  $3s+  s-zz|4 C*  /Sz  0c!,  !&1 ;;??   OO  <<         ==         rc,X lURRUS9 U(a UupEnURnUbUSU3nSnOSnSnUR nURRXxS9 URn U (a9URRURU5upU RX5 URS5 URR5(aUR5 UR Hn U RSS 9 M UR"R%5 U=R&S- slUR(R*R-S S 5 U=R&S-slUR Hn U RS S 9 M URRSS9 URRSUR S9 SUlg![a S[ U5-nGNf=f! GN=f) Nrgz%sr7yellow)rgr}rrnormalrnvwait::idledebugwaitrm)rrrr$AttributeErrorstrrrrZrE get_stack load_stackshow_variablesrrsync_source_linerrXwakeuprHrRtkcall) rrrinfotypevaluetbm1bgsvstackirs rrDebugger.interactions  7+ "OD &]] 4r%)BBBBB "4    xx))$**b9HE MM% # A <<      ! ! #A KKhK '  a '#45 aA KKjK ) 2& "> Q" &CI% & s G/H/H  H HcURnU(dgURU5up#USSUSS-S:waA[RR U5(aUR R X#5 ggg)Nrrz<>)r_Debugger__frame2fileliner9r:existsr gotofileline)rrr>r?s rrDebugger.sync_source_line.sj  007 BQ<(23- '4 /BGGNN84L4L JJ # #H 55M /rcPURnURnURnX44$r )r.r/r8)rrr=r>r?s r__frame2filelineDebugger.__frame2fileline6s(||##rcXURR5 UR5 gr )rE set_continuerQrs rr Debugger.cont<s  rcXURR5 UR5 gr )rErrQrs rr Debugger.step@  rcnURRUR5 UR5 gr )rEset_nextrrQrs rr Debugger.nextDs" $**% rcnURRUR5 UR5 gr )rE set_returnrrQrs rr Debugger.retHs" DJJ' rcXURR5 UR5 gr )rEset_quitrQrs rrV Debugger.quitLrrcRURRRSSS5 g)Nrr1)rRrrrs rrQDebugger.abort_loopPs %!2C8rcUR(dURR5(at[URUR U5=UlnUR (a:URRUR S5up#URX#5 ggURnU(a6URR5(dSUlUR5 SURS'g)Nrrr~) rZrr StackViewerrrrrErrr[)rrrrs rrDebugger.show_stackSsDKKOO$5$5$/ TZZ$N ND rzz88--djj$? e'!!B$++//++#'  $%DKK !rcdURR5(aUR5 ggr )rrrrs rrDebugger.show_source`s& <<      ! ! # rc8USUlUR5 gNr)rr)r stackitems r show_frameDebugger.show_framedsq\  rcURnURR5(a#U(d[URS5UlO-U(a&SUlUR 5 SURS'UR 5 g)Nryrrr~) localsviewerrrNamespaceViewerrr[r)rlvs rrDebugger.show_localshse    <<    $3DLL($K!$(! )* X& rcURnURR5(a#U(d[URS5UlO-U(a&SUlUR 5 SURS'UR 5 g)Nrzrrr~) globalsviewerrrrrr[r)rgvs rrDebugger.show_globalstse    ==    %4T]]I%N"%)" *+ h' rcURnURnURnU(dS=pVO,URnURnU(a U(aXVLaSnU(a0UR XQUR RR5 U(a1UR XaUR RR5 ggr ) rrrf_locals f_globals load_dictrDinterprpcclt)rforcerrrldictgdicts rrDebugger.show_variabless        EENNEOOEbU^ LLt||':':'A'A B LLt||':':'A'A B rc:URRX5 g)zjSet a filename-lineno breakpoint in the debugger. Called from self.load_breakpoints and EW.setbreakpoint N)rE set_breakrr>r?s rset_breakpointDebugger.set_breakpoints 8,rc:URRX5 gr )rE clear_breakrs rclear_breakpointDebugger.clear_breakpoints X.rc:URRU5 gr )rEclear_all_file_breaks)rr>s rclear_file_breaksDebugger.clear_file_breakss &&x0rcURRRH>nURRnUR HnUR X#5 M M@ g![a MPf=f)z>Load PyShellEditorWindow breakpoints into subprocess debugger.N)rDr inversedictior> breakpointsrr)reditwinr>r?s rload_breakpointsDebugger.load_breakpointssb||))55Gzz**H %11F''926 "  s$A$$ A21A2)rrrrrrrrrrrrrrrrrrrrErGrrHrDrRrZrrXr )r)$r$r%r&r'r(rrrrrZrrrrMr[rFrrrrrrrrVrQrrrrrrrr rrr)rrrArAUs FGGHKLM$'%R$J X0d6 9 &$  C -/1rrAcR\rSrSrSrSrSSjrSrSrSr S r S r S r S r S rg)riz#Code stack viewer for debugger GUI.c[R"5(a[R"X5 O[R"XSS9 X lX0l/Ulg)NP)width)risAquaTkrrrrr)rmasterrrs rrStackViewer.__init__s@ ??    ! !$ /  ! !$b 9  rNcXlUR5 [[U55HnXupEURSnUR nUR nURn SSKn U RX5n U R5n U S;aSXeU 4-n OSXiX[4-n X2:XaSU -n URU 5 M UbURU5 gg! SnN=f)Nr$r6r)r6rNz%s, line %d: %sz%s.%s(), line %d: %sz> ) rclearrangelenrr.r/r< linecachegetlinestriprselect) rrindexrrr?modnamer=r>funcnamer% sourcelineitems rrStackViewer.load_stacks  s5z"A!HME //*5<edits rrStackViewer.show_sourcesU,S_, -  5) ||## 77>>( # #::??8,D f% $r)rrrr )r$r%r&r'r(rrr2r:r>rAr8r9rr)rrrrrs2) 49 83   3 &rrc6\rSrSrSrS SjrSrS SjrSrSr g) riz/Global/local namespace viewer for debugger GUI.Nc SnSnU(aS[U5-nXlX lSSKnUR 5UlSUR lSUR l[U5=Ul nURRSSS9 [XrSS S 9Ul URRS S 9 [US S9=UlnURSSS9 [U[!S[#SU55SSXE4S9=Uln U RSSSS9 U R&US'UR(U S'[U 5=Uln U R-SSU SS9UlUR1U5 g)Nr(<rrrrgroove)rg borderwidthreliefr{)r|vbar)namerighty)rqr|,)r~ scrollregionrp)rqr|rrhyscrollcommandnw)windowre)r$rtitlereprlibReprrepr maxstringmaxotherrrrrr5rrXCanvasminmaxcanvasyviewrsubframe create_windowsfidr) rrraodictrr~rbrrXrjrls rrNamespaceViewer.__init__sO E ]F  LLN    "6]* U qv.5!HM  S!$U88 D wS )%e-0c"fo-F45q%3H J J f  fQ 7 ,,Y#'88 #(=0 ((Aht(L  urrchXRLaU(dgURnURn[URR 55HnUR 5 M SUlU(d[USS9nURSSS9 OUR5n[U5n Sn U H{n Xn URRU 5n U(aU SSn [XKS9nURU SSS9 [USSS 9nURSU 5 URU SSS9 U S-n M} XlUR5 UR5nUR!5nUR"nSSX4UR"S 'US :aS US 'UR%SS 9 gUUS 'UR%SS 9 g)NNonerrrurrrr_)rvrwsticky)rrVr]r\r~)r) prev_odictrlrlistchildrenvaluesr]rrkeyssortedrdEntryinsertupdate_idletaskswinfo_reqwidthwinfo_reqheightrjr)rror rpc_clientrlrcl keys_listnamesrvrYrsvaluerr~rjs rrNamespaceViewer.load_dicts OO #E == h''..01A IIK2hV,A FFqF # I9%EC .#Ab\F(.3q6(!;F#3q6!e !!#'')))+'(!U&; N# C<"F8  JJaJ %F8  JJaJ rc8URR5 gr )rr]rs rr[NamespaceViewer.closeRs r) rjrr5rrtrdrnrlrarXr )rN) r$r%r&r'r(rrtrr[r)rrrrrs56J4!lrr__main__)mainzidlelib.idle_test.test_debuggerrTF) verbosityexit)r(bdbr9tkinter tkinter.ttkrrr,ridlelib.scrolledlistridlelib.windowrBdbr rrrArrr$unittestrrrrrs" (-)7#''7: ( PPf Q&,Q&hWWt z *aeDr