(1) A Pause button for the Debug Output window, so it won't show anything unless unpaused. Reason: Sometimes a lot of debug output goes there and you don't want to scroll back through a long list to find the needle in the haystack, especially if the output is still updating while you're trying to scroll. So this would let us pause it until we're ready to start/continue the output again.
(2) A text field for a filter, so that only outputs containing that text from that point on will be output. A blank field means show all text for new outputs.
Both these items could be added in front of the current "Copy all", "Save", and "Clear" buttons.
And speaking of copying/saving, request (3): An option to only copy or save the selected items, instead of all items.
Here's a quick mock-up of what I mean, and thanks for considering!
Code: Select all
Global output,outputpaused,outputfilter$,outputfilterold$
Procedure OutputTest(null)
Repeat
Sleep_(25)
If outputpaused=0
t$=""
For a=1 To 10
Select Random(2)
Case 0 : t$+Chr(Random(9)+48) ; 0-9
Case 1 : t$+Chr(Random(25)+97) ; a-z
Case 2 : t$+Chr(Random(25)+65) ; A-Z
EndSelect
Next
If outputfilter$="" Or FindString(t$,outputfilter$)
AddGadgetItem(2,-1,t$)
SendMessage_(output,#EM_SETSEL,-1,0)
EndIf
EndIf
ForEver
EndProcedure
OpenWindow(0,500,200,330,250,"Debug Output",#PB_Window_SystemMenu)
pause=ButtonGadget(0,10,10,100,25,"Pause",#PB_Button_Toggle)
filter=StringGadget(1,120,10,200,25,"")
output=EditorGadget(2,10,40,310,200)
CreateThread(@OutputTest(),0)
Repeat
ev=WaitWindowEvent()
If ev=#PB_Event_Gadget
Select EventGadget()
Case 0
outputpaused=GetGadgetState(0)
Case 1
outputfilter$=GetGadgetText(1)
If outputfilter$<>outputfilterold$
outputfilterold$=outputfilter$
EndIf
EndSelect
EndIf
Until ev=#PB_Event_CloseWindow