OBJECT Page 9506 Session List { OBJECT-PROPERTIES { Date=31.10.18; Time=12:00:00; Modified=Yes; Version List=NAVW111.00; } PROPERTIES { CaptionML=ENU=Session List; InsertAllowed=No; DeleteAllowed=No; ModifyAllowed=No; LinksAllowed=No; SourceTable=Table2000000110; PageType=List; RefreshOnActivate=Yes; PromotedActionCategoriesML=ENU=New,Process,Report,Session,SQL Trace,Events; OnOpenPage=BEGIN FILTERGROUP(2); SETFILTER("Server Instance ID",'=%1',SERVICEINSTANCEID); SETFILTER("Session ID",'<>%1',SESSIONID); FILTERGROUP(0); FullSQLTracingStarted := DEBUGGER.ENABLESQLTRACE(0); END; OnFindRecord=BEGIN CanDebugNextSession := NOT DEBUGGER.ISACTIVE; CanDebugSelectedSession := NOT DEBUGGER.ISATTACHED AND NOT ISEMPTY; // If the session list is empty, insert an empty row to carry the button state to the client IF NOT FIND(Which) THEN BEGIN INIT; "Session ID" := 0; END; EXIT(TRUE); END; OnAfterGetRecord=BEGIN IsDebugging := DEBUGGER.ISACTIVE AND ("Session ID" = DEBUGGER.DEBUGGINGSESSIONID); IsDebugged := DEBUGGER.ISATTACHED AND ("Session ID" = DEBUGGER.DEBUGGEDSESSIONID); IsSQLTracing := DEBUGGER.ENABLESQLTRACE("Session ID"); IsRowSessionActive := ISSESSIONACTIVE("Session ID"); // If this is the empty row, clear the Session ID and Client Type IF "Session ID" = 0 THEN BEGIN SessionIdText := ''; ClientTypeText := ''; END ELSE BEGIN SessionIdText := FORMAT("Session ID"); ClientTypeText := FORMAT("Client Type"); END; END; ActionList=ACTIONS { { 9 ; ;ActionContainer; ActionContainerType=ActionItems } { 8 ;1 ;Separator } { 13 ;1 ;ActionGroup; Name=Session; CaptionML=ENU=Session } { 11 ;2 ;Action ; Name=Debug Selected Session; ShortCutKey=Shift+Ctrl+S; CaptionML=ENU=Debug; ToolTipML=ENU=Debug the selected session; ApplicationArea=#All; Promoted=Yes; Enabled=CanDebugSelectedSession; PromotedIsBig=Yes; Image=Debug; PromotedCategory=Category4; OnAction=BEGIN DebuggerManagement.SetDebuggedSession(Rec); DebuggerManagement.OpenDebuggerTaskPage; END; } { 10 ;2 ;Action ; Name=Debug Next Session; ShortCutKey=Shift+Ctrl+N; CaptionML=ENU=Debug Next; ToolTipML=ENU=Debug the next session that breaks code execution.; ApplicationArea=#All; Promoted=Yes; Enabled=CanDebugNextSession; PromotedIsBig=Yes; Image=DebugNext; PromotedCategory=Category4; OnAction=VAR DebuggedSessionTemp@1001 : Record 2000000110; BEGIN DebuggedSessionTemp."Session ID" := 0; DebuggerManagement.SetDebuggedSession(DebuggedSessionTemp); DebuggerManagement.OpenDebuggerTaskPage; END; } { 50000 ;2 ;Action ; CaptionML=ENU=Kill Session; Promoted=Yes; PromotedIsBig=Yes; Image=Delete; PromotedCategory=Category4; OnAction=BEGIN IF CONFIRM(Text001,FALSE) THEN STOPSESSION("Session ID"); END; } { 19 ;1 ;ActionGroup; Name=SQL Trace; CaptionML=ENU=SQL Trace } { 20 ;2 ;Action ; Name=Start Full SQL Tracing; CaptionML=ENU=Start Full SQL Tracing; ToolTipML=ENU=Start SQL tracing.; ApplicationArea=#All; Promoted=Yes; Enabled=NOT FullSQLTracingStarted; Image=Continue; PromotedCategory=Category5; OnAction=BEGIN DEBUGGER.ENABLESQLTRACE(0,TRUE); FullSQLTracingStarted := TRUE; END; } { 21 ;2 ;Action ; Name=Stop Full SQL Tracing; CaptionML=ENU=Stop Full SQL Tracing; ToolTipML=ENU=Stop the current SQL tracing.; ApplicationArea=#All; Promoted=Yes; Enabled=FullSQLTracingStarted; Image=Stop; PromotedCategory=Category5; OnAction=BEGIN DEBUGGER.ENABLESQLTRACE(0,FALSE); FullSQLTracingStarted := FALSE; END; } { 17 ;1 ;ActionGroup; Name=Event; CaptionML=ENU=Event } { 18 ;2 ;Action ; Name=Subscriptions; CaptionML=ENU=Subscriptions; ToolTipML=ENU=Show event subscriptions.; ApplicationArea=#All; RunObject=Page 9510; Promoted=Yes; Image=Event; PromotedCategory=Category6 } } } CONTROLS { { 1 ;0 ;Container ; ContainerType=ContentArea } { 2 ;1 ;Group ; Name=Group; GroupType=Repeater } { 3 ;2 ;Field ; CaptionML=ENU=Session ID; ToolTipML=ENU=Specifies the session in the list.; ApplicationArea=#All; SourceExpr=SessionIdText; Editable=FALSE } { 4 ;2 ;Field ; CaptionML=ENU=User ID; ToolTipML=ENU=Specifies the user name of the user who is logged on to the active session.; ApplicationArea=#All; SourceExpr="User ID"; Editable=FALSE } { 15 ;2 ;Field ; CaptionML=ENU=SQL Tracing; ToolTipML=ENU=Specifies if SQL tracing is enabled.; ApplicationArea=#All; SourceExpr=IsSQLTracing; Editable=IsRowSessionActive; OnValidate=BEGIN IsSQLTracing := DEBUGGER.ENABLESQLTRACE("Session ID",IsSQLTracing); END; } { 5 ;2 ;Field ; Name=Client Type; CaptionML=ENU=Client Type; ToolTipML=ENU="Specifies the client type on which the session event occurred, such as Web Service and Client Service . "; ApplicationArea=#All; SourceExpr=ClientTypeText; Editable=FALSE } { 6 ;2 ;Field ; CaptionML=ENU=Login Date; ToolTipML=ENU=Specifies the date and time that the session started on the Dynamics NAV Server instance.; ApplicationArea=#All; SourceExpr="Login Datetime"; Editable=FALSE } { 14 ;2 ;Field ; CaptionML=ENU=Server Computer Name; ToolTipML=ENU=Specifies the fully qualified domain name (FQDN) of the computer on which the Dynamics NAV Server instance runs.; ApplicationArea=#All; SourceExpr="Server Computer Name"; Editable=FALSE } { 7 ;2 ;Field ; CaptionML=ENU=Server Instance Name; ToolTipML=ENU=Specifies the name of the Dynamics NAV Server instance to which the session is connected. The server instance name comes from the Session Event table.; ApplicationArea=#All; SourceExpr="Server Instance Name"; Editable=FALSE } { 12 ;2 ;Field ; CaptionML=ENU=Debugging; ToolTipML=ENU=Specifies sessions that are being debugged.; ApplicationArea=#All; SourceExpr=IsDebugging; Editable=FALSE } { 16 ;2 ;Field ; CaptionML=ENU=Debugged; ToolTipML=ENU=Specifies debugged sessions.; ApplicationArea=#All; SourceExpr=IsDebugged; Editable=FALSE } } CODE { VAR DebuggerManagement@1000 : Codeunit 9500; CanDebugNextSession@1002 : Boolean INDATASET; CanDebugSelectedSession@1003 : Boolean INDATASET; FullSQLTracingStarted@1008 : Boolean INDATASET; IsDebugging@1004 : Boolean; IsDebugged@1005 : Boolean; IsSQLTracing@1007 : Boolean; IsRowSessionActive@1009 : Boolean; SessionIdText@1001 : Text; ClientTypeText@1006 : Text; Text001@50000 : TextConst 'ENU=Do you want to kill the selected session?'; BEGIN END. } }