mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
Full Template for ticket #1
This commit is contained in:
parent
74f265b3b3
commit
f439dc8dcd
2150 changed files with 286240 additions and 0 deletions
145
Templates/Full/game/tools/debugger/gui/breakConditionDlg.ed.gui
Normal file
145
Templates/Full/game/tools/debugger/gui/breakConditionDlg.ed.gui
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(DebuggerBreakConditionDlg, EditorGuiGroup) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "220 146";
|
||||
extent = "200 188";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Set the break condition";
|
||||
resizeWidth = "True";
|
||||
resizeHeight = "True";
|
||||
canMove = "False";
|
||||
canClose = "False";
|
||||
canMinimize = "False";
|
||||
canMaximize = "False";
|
||||
minSize = "50 50";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 28";
|
||||
extent = "121 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Enter the break condition:";
|
||||
};
|
||||
new GuiTextEditCtrl(BreakCondition) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 44";
|
||||
extent = "160 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
altCommand = "DbgBreakConditionSet();";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 68";
|
||||
extent = "57 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Pass Count:";
|
||||
};
|
||||
new GuiTextEditCtrl(BreakPassCount) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 84";
|
||||
extent = "160 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
returnTab = "true";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 108";
|
||||
extent = "27 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Clear:";
|
||||
};
|
||||
new GuiTextEditCtrl(BreakClear) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 124";
|
||||
extent = "160 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
returnTab = "true";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "56 156";
|
||||
extent = "40 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "DbgBreakConditionSet();";
|
||||
helpTag = "0";
|
||||
text = "Set";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "104 156";
|
||||
extent = "40 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "Canvas.popDialog(DebuggerBreakConditionDlg);";
|
||||
helpTag = "0";
|
||||
text = "Cancel";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
148
Templates/Full/game/tools/debugger/gui/connectDlg.ed.gui
Normal file
148
Templates/Full/game/tools/debugger/gui/connectDlg.ed.gui
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(DebuggerConnectDlg, EditorGuiGroup) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "220 146";
|
||||
extent = "200 188";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Connect to server:";
|
||||
resizeWidth = "True";
|
||||
resizeHeight = "True";
|
||||
canMove = "False";
|
||||
canClose = "False";
|
||||
canMinimize = "False";
|
||||
canMaximize = "False";
|
||||
minSize = "50 50";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 28";
|
||||
extent = "55 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "IP Address:";
|
||||
};
|
||||
new GuiTextEditCtrl(DebuggerConnectAddress) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 44";
|
||||
extent = "160 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
variable = "$pref::DBGConnectAddress";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
returnTab = "true";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 68";
|
||||
extent = "21 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Port:";
|
||||
};
|
||||
new GuiTextEditCtrl(DebuggerConnectPort) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 84";
|
||||
extent = "160 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
variable = "$pref::DBGConnectPort";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
returnTab = "true";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 108";
|
||||
extent = "52 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Password:";
|
||||
};
|
||||
new GuiTextEditCtrl(DebuggerConnectPassword) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 124";
|
||||
extent = "160 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
variable = "$pref::DBGConnectPassword";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
returnTab = "true";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "56 156";
|
||||
extent = "40 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "DbgConnect();";
|
||||
helpTag = "0";
|
||||
text = "Open";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "104 156";
|
||||
extent = "40 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "Canvas.popDialog(DebuggerConnectDlg);";
|
||||
helpTag = "0";
|
||||
text = "Cancel";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
583
Templates/Full/game/tools/debugger/gui/debugger.ed.gui
Normal file
583
Templates/Full/game/tools/debugger/gui/debugger.ed.gui
Normal file
|
|
@ -0,0 +1,583 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(DebuggerGui, EditorGuiGroup) {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "8 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "Canvas.pushDialog(DebuggerConnectDlg, 80);";
|
||||
helpTag = "0";
|
||||
text = "Connect";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "72 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "Canvas.pushDialog(OpenFileDialog, 80);";
|
||||
helpTag = "0";
|
||||
text = "File";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "72 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "dbgStepIn();";
|
||||
accelerator = "f7";
|
||||
helpTag = "0";
|
||||
text = "Step In";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "136 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "dbgStepOver();";
|
||||
accelerator = "f8";
|
||||
helpTag = "0";
|
||||
text = "Step Over";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "200 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "dbgStepOut();";
|
||||
accelerator = "f6";
|
||||
helpTag = "0";
|
||||
text = "Step Out";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "264 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "dbgContinue();";
|
||||
accelerator = "f9";
|
||||
helpTag = "0";
|
||||
text = "Run";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "328 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "Canvas.pushDialog(DebuggerFindDlg, 80);";
|
||||
helpTag = "0";
|
||||
text = "Find";
|
||||
};
|
||||
new GuiTextCtrl(DebuggerCursorWatch) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
position = "398 4";
|
||||
extent = "126 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "";
|
||||
justify = "left";
|
||||
};
|
||||
new GuiTextCtrl(DebuggerStatus) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
position = "532 4";
|
||||
extent = "100 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "NOT CONNECTED";
|
||||
justify = "right";
|
||||
};
|
||||
new GuiFrameSetCtrl(DebuggerRootFrame) {
|
||||
profile = "GuiContentProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 24";
|
||||
extent = "640 456";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
columns = "0 486";
|
||||
rows = "0";
|
||||
borderWidth = "4";
|
||||
borderEnable = "dynamic";
|
||||
borderMovable = "dynamic";
|
||||
|
||||
new GuiFrameSetCtrl(DebuggerLeftFrame) {
|
||||
profile = "GuiContentProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "482 456";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
columns = "0";
|
||||
rows = "0 350";
|
||||
borderWidth = "4";
|
||||
borderEnable = "dynamic";
|
||||
borderMovable = "dynamic";
|
||||
|
||||
new GuiControl() {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "482 346";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "8 4";
|
||||
extent = "47 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Open File:";
|
||||
};
|
||||
new GuiPopUpMenuCtrl(DebuggerFilePopup) {
|
||||
profile = "GuiPopUpMenuProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "64 4";
|
||||
extent = "160 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
maxPopupHeight = "200";
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 24";
|
||||
extent = "482 321";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "True";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "dynamic";
|
||||
lockHorizScroll = "false";
|
||||
lockVertScroll = "false";
|
||||
constantThumbHeight = "False";
|
||||
|
||||
new DbgFileView(DebuggerFileView) {
|
||||
profile = "GuiTextArrayProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 -433";
|
||||
extent = "509 3904";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
new GuiControl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 350";
|
||||
extent = "482 106";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "8 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "Canvas.pushDialog(DebuggerWatchDlg, 80);";
|
||||
helpTag = "0";
|
||||
text = "Add";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "72 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "Canvas.pushDialog(DebuggerEditWatchDlg, 80);";
|
||||
helpTag = "0";
|
||||
text = "Edit";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "136 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "DbgDeleteSelectedWatch();";
|
||||
helpTag = "0";
|
||||
text = "Delete";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "200 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "DebuggerWatchView.clear();";
|
||||
helpTag = "0";
|
||||
text = "Clear";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "264 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "DbgRefreshWatches();";
|
||||
helpTag = "0";
|
||||
text = "Refresh";
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 24";
|
||||
extent = "481 80";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "True";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "dynamic";
|
||||
lockHorizScroll = "false";
|
||||
lockVertScroll = "false";
|
||||
constantThumbHeight = "False";
|
||||
|
||||
new GuiTextListCtrl(DebuggerWatchView) {
|
||||
profile = "GuiTextListProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 8";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
enumerate = "False";
|
||||
resizeCell = "True";
|
||||
columns = "0 200";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
new GuiFrameSetCtrl(DebuggerRightFrame) {
|
||||
profile = "GuiContentProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "486 0";
|
||||
extent = "154 456";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
columns = "0";
|
||||
rows = "0 150 350";
|
||||
borderWidth = "4";
|
||||
borderEnable = "dynamic";
|
||||
borderMovable = "dynamic";
|
||||
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "154 146";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "True";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "dynamic";
|
||||
lockHorizScroll = "false";
|
||||
lockVertScroll = "false";
|
||||
constantThumbHeight = "False";
|
||||
|
||||
new GuiTextListCtrl(DebuggerCallStack) {
|
||||
profile = "GuiTextListProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 8";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
enumerate = "False";
|
||||
resizeCell = "True";
|
||||
columns = "-1 -1 0";
|
||||
};
|
||||
};
|
||||
new GuiControl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 150";
|
||||
extent = "154 196";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "4 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "Canvas.pushDialog(DebuggerBreakConditionDlg, 80);";
|
||||
helpTag = "0";
|
||||
text = "Condition";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "68 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "DbgDeleteSelectedBreak();";
|
||||
helpTag = "0";
|
||||
text = "Delete";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "132 4";
|
||||
extent = "56 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "DebuggerBreakPoints.clearBreaks();";
|
||||
helpTag = "0";
|
||||
text = "Clear";
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 24";
|
||||
extent = "153 171";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "True";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "dynamic";
|
||||
lockHorizScroll = "false";
|
||||
lockVertScroll = "false";
|
||||
constantThumbHeight = "False";
|
||||
|
||||
new GuiTextListCtrl(DebuggerBreakPoints) {
|
||||
profile = "GuiTextListProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "182 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
enumerate = "False";
|
||||
resizeCell = "True";
|
||||
columns = "16 56 156";
|
||||
};
|
||||
};
|
||||
};
|
||||
new GuiControl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 350";
|
||||
extent = "154 106";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "153 80";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "True";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "dynamic";
|
||||
lockHorizScroll = "false";
|
||||
lockVertScroll = "false";
|
||||
constantThumbHeight = "False";
|
||||
|
||||
new GuiTextListCtrl(DebuggerConsoleView) {
|
||||
profile = "GuiTextListProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "62 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
enumerate = "False";
|
||||
resizeCell = "True";
|
||||
columns = "0";
|
||||
};
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
position = "15 83";
|
||||
extent = "9 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "%";
|
||||
};
|
||||
new GuiTextEditCtrl(DbgConsoleEntry) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "top";
|
||||
position = "29 83";
|
||||
extent = "120 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
altCommand = "DbgConsoleEntryReturn();";
|
||||
helpTag = "0";
|
||||
historySize = "32";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
93
Templates/Full/game/tools/debugger/gui/editWatchDlg.ed.gui
Normal file
93
Templates/Full/game/tools/debugger/gui/editWatchDlg.ed.gui
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(DebuggerEditWatchDlg, EditorGuiGroup) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "220 180";
|
||||
extent = "200 108";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Edit a Variable";
|
||||
resizeWidth = "True";
|
||||
resizeHeight = "True";
|
||||
canMove = "False";
|
||||
canClose = "False";
|
||||
canMinimize = "False";
|
||||
canMaximize = "False";
|
||||
minSize = "50 50";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 28";
|
||||
extent = "99 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Enter the new value:";
|
||||
};
|
||||
new GuiTextEditCtrl(EditWatchDialogValue) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 44";
|
||||
extent = "160 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
altCommand = "DbgWatchDialogEdit();";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
fontHL = "14 253 Arial";
|
||||
font = "14 244 Arial";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "56 80";
|
||||
extent = "40 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "DbgWatchDialogEdit();";
|
||||
helpTag = "0";
|
||||
text = "Edit";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "104 80";
|
||||
extent = "40 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "Canvas.popDialog(DebuggerEditWatchDlg);";
|
||||
helpTag = "0";
|
||||
text = "Cancel";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
93
Templates/Full/game/tools/debugger/gui/findDlg.ed.gui
Normal file
93
Templates/Full/game/tools/debugger/gui/findDlg.ed.gui
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(DebuggerFindDlg, EditorGuiGroup) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "220 180";
|
||||
extent = "200 108";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "File Search";
|
||||
resizeWidth = "True";
|
||||
resizeHeight = "True";
|
||||
canMove = "False";
|
||||
canClose = "False";
|
||||
canMinimize = "False";
|
||||
canMaximize = "False";
|
||||
minSize = "50 50";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 28";
|
||||
extent = "99 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Search for:";
|
||||
};
|
||||
new GuiTextEditCtrl(DebuggerFindStringText) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 44";
|
||||
extent = "160 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
altCommand = "DbgFileViewFind();";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
fontHL = "14 253 Arial";
|
||||
font = "14 244 Arial";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "56 80";
|
||||
extent = "40 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "DbgFileViewFind();";
|
||||
helpTag = "0";
|
||||
text = "Find";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "104 80";
|
||||
extent = "40 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "Canvas.popDialog(DebuggerFindDlg);";
|
||||
helpTag = "0";
|
||||
text = "Cancel";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
92
Templates/Full/game/tools/debugger/gui/watchDlg.ed.gui
Normal file
92
Templates/Full/game/tools/debugger/gui/watchDlg.ed.gui
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(DebuggerWatchDlg, EditorGuiGroup) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "220 180";
|
||||
extent = "200 108";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Add a Watch Expression:";
|
||||
resizeWidth = "True";
|
||||
resizeHeight = "True";
|
||||
canMove = "False";
|
||||
canClose = "False";
|
||||
canMinimize = "False";
|
||||
canMaximize = "False";
|
||||
minSize = "50 50";
|
||||
opaque = "true";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 28";
|
||||
extent = "88 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Enter the Variable:";
|
||||
};
|
||||
new GuiTextEditCtrl(WatchDialogExpression) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 44";
|
||||
extent = "160 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
altCommand = "DbgWatchDialogAdd();";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "56 80";
|
||||
extent = "40 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "DbgWatchDialogAdd();";
|
||||
helpTag = "0";
|
||||
text = "Add";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "104 80";
|
||||
extent = "40 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "Canvas.popDialog(DebuggerWatchDlg);";
|
||||
helpTag = "0";
|
||||
text = "Cancel";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
68
Templates/Full/game/tools/debugger/main.cs
Normal file
68
Templates/Full/game/tools/debugger/main.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
// TCP Debugger
|
||||
// To use the debugger, first call "dbgSetParameters(port, password);" from one instance of
|
||||
// your game. Then, in another instance (either on the same system, or a different one) call
|
||||
// "startDebugger();". Then use the gui to connect to the first instance with the port and
|
||||
// password you first passed to dbgSetParameters.
|
||||
//---------------------------------------------------------------------------------------------
|
||||
|
||||
function initializeDebugger()
|
||||
{
|
||||
echo(" % - Initializing Debugger");
|
||||
|
||||
// Load the scripts.
|
||||
exec("./Scripts/debugger.ed.cs");
|
||||
|
||||
// And the guis.
|
||||
exec("./Gui/breakConditionDlg.ed.gui");
|
||||
exec("./Gui/connectDlg.ed.gui");
|
||||
exec("./Gui/editWatchDlg.ed.gui");
|
||||
exec("./Gui/findDlg.ed.gui");
|
||||
exec("./Gui/debugger.ed.gui");
|
||||
exec("./Gui/watchDlg.ed.gui");
|
||||
}
|
||||
|
||||
function destroyDebugger()
|
||||
{
|
||||
if (isObject(TCPDebugger))
|
||||
TCPDebugger.delete();
|
||||
}
|
||||
|
||||
function startDebugger()
|
||||
{
|
||||
// Clean up first.
|
||||
destroyDebugger();
|
||||
|
||||
// Create a TCP object named TCPDebugger.
|
||||
new TCPObject(TCPDebugger);
|
||||
|
||||
// Used to get unique IDs for breakpoints and watch expressions.
|
||||
$DbgBreakId = 0;
|
||||
$DbgWatchSeq = 1;
|
||||
|
||||
// Set up the GUI.
|
||||
DebuggerConsoleView.setActive(false);
|
||||
Canvas.pushDialog(DebuggerGui);
|
||||
}
|
||||
508
Templates/Full/game/tools/debugger/scripts/debugger.ed.cs
Normal file
508
Templates/Full/game/tools/debugger/scripts/debugger.ed.cs
Normal file
|
|
@ -0,0 +1,508 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
// onLine is invoked whenever the TCP object receives a line from the server. Treat the first
|
||||
// word as a "command" and dispatch to an appropriate handler.
|
||||
//---------------------------------------------------------------------------------------------
|
||||
function TCPDebugger::onLine(%this, %line)
|
||||
{
|
||||
echo("Got line=>" @ %line);
|
||||
%cmd = firstWord(%line);
|
||||
%rest = restWords(%line);
|
||||
|
||||
if (%cmd $= "PASS") {
|
||||
%this.handlePass(%rest);
|
||||
}
|
||||
else if(%cmd $= "COUT") {
|
||||
%this.handleLineOut(%rest);
|
||||
}
|
||||
else if(%cmd $= "FILELISTOUT") {
|
||||
%this.handleFileList(%rest);
|
||||
}
|
||||
else if(%cmd $= "BREAKLISTOUT") {
|
||||
%this.handleBreakList(%rest);
|
||||
}
|
||||
else if(%cmd $= "BREAK") {
|
||||
%this.handleBreak(%rest);
|
||||
}
|
||||
else if(%cmd $= "RUNNING") {
|
||||
%this.handleRunning();
|
||||
}
|
||||
else if(%cmd $= "EVALOUT") {
|
||||
%this.handleEvalOut(%rest);
|
||||
}
|
||||
else {
|
||||
%this.handleError(%line);
|
||||
}
|
||||
}
|
||||
|
||||
// Handler for PASS response.
|
||||
function TCPDebugger::handlePass(%this, %message)
|
||||
{
|
||||
if (%message $= "WrongPass") {
|
||||
DebuggerConsoleView.print("Disconnected - wrong password.");
|
||||
%this.disconnect();
|
||||
}
|
||||
else if(%message $= "Connected.") {
|
||||
DebuggerConsoleView.print("Connected.");
|
||||
DebuggerStatus.setValue("CONNECTED");
|
||||
%this.send("FILELIST\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
// Handler for COUT response.
|
||||
function TCPDebugger::handleLineOut(%this, %line)
|
||||
{
|
||||
DebuggerConsoleView.print(%line);
|
||||
}
|
||||
|
||||
// Handler for FILELISTOUT response.
|
||||
function TCPDebugger::handleFileList(%this, %line)
|
||||
{
|
||||
DebuggerFilePopup.clear();
|
||||
%word = 0;
|
||||
while ((%file = getWord(%line, %word)) !$= "") {
|
||||
%word++;
|
||||
DebuggerFilePopup.add(%file, %word);
|
||||
}
|
||||
}
|
||||
|
||||
// Handler for BREAKLISTOUT response.
|
||||
function TCPDebugger::handleBreakList(%this, %line)
|
||||
{
|
||||
%file = getWord(%line, 0);
|
||||
if (%file != $DebuggerFile) {
|
||||
return;
|
||||
}
|
||||
%pairs = getWord(%line, 1);
|
||||
%curLine = 1;
|
||||
DebuggerFileView.clearBreakPositions();
|
||||
|
||||
// Set the possible break positions.
|
||||
for (%i = 0; %i < %pairs; %i++) {
|
||||
%skip = getWord(%line, %i * 2 + 2);
|
||||
%breaks = getWord(%line, %i * 2 + 3);
|
||||
%curLine += %skip;
|
||||
for (%j = 0; %j < %breaks; %j++) {
|
||||
DebuggerFileView.setBreakPosition(%curLine);
|
||||
%curLine++;
|
||||
}
|
||||
}
|
||||
|
||||
// Now set the actual break points.
|
||||
for (%i = 0; %i < DebuggerBreakPoints.rowCount(); %i++) {
|
||||
%breakText = DebuggerBreakPoints.getRowText(%i);
|
||||
%breakLine = getField(%breakText, 0);
|
||||
%breakFile = getField(%breakText, 1);
|
||||
if (%breakFile == $DebuggerFile) {
|
||||
DebuggerFileView.setBreak(%breakLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Handler for BREAK response.
|
||||
function TCPDebugger::handleBreak(%this, %line)
|
||||
{
|
||||
DebuggerStatus.setValue("BREAK");
|
||||
|
||||
// Query all the watches.
|
||||
for (%i = 0; %i < DebuggerWatchView.rowCount(); %i++) {
|
||||
%id = DebuggerWatchView.getRowId(%i);
|
||||
%row = DebuggerWatchView.getRowTextById(%id);
|
||||
%expr = getField(%row, 0);
|
||||
%this.send("EVAL " @ %id @ " 0 " @ %expr @ "\r\n");
|
||||
}
|
||||
|
||||
// Update the call stack window.
|
||||
DebuggerCallStack.clear();
|
||||
|
||||
%file = getWord(%line, 0);
|
||||
%lineNumber = getWord(%line, 1);
|
||||
%funcName = getWord(%line, 2);
|
||||
|
||||
DbgOpenFile(%file, %lineNumber, true);
|
||||
|
||||
%nextWord = 3;
|
||||
%rowId = 0;
|
||||
%id = 0;
|
||||
while(1) {
|
||||
DebuggerCallStack.setRowById(%id, %file @ "\t" @ %lineNumber @ "\t" @ %funcName);
|
||||
%id++;
|
||||
%file = getWord(%line, %nextWord);
|
||||
%lineNumber = getWord(%line, %nextWord + 1);
|
||||
%funcName = getWord(%line, %nextWord + 2);
|
||||
%nextWord += 3;
|
||||
if (%file $= "") {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Handler for RUNNING response.
|
||||
function TCPDebugger::handleRunning(%this)
|
||||
{
|
||||
DebuggerFileView.setCurrentLine(-1, true);
|
||||
DebuggerCallStack.clear();
|
||||
DebuggerStatus.setValue("RUNNING...");
|
||||
}
|
||||
|
||||
// Handler for EVALOUT response.
|
||||
function TCPDebugger::handleEvalOut(%this, %line)
|
||||
{
|
||||
%id = firstWord(%line);
|
||||
%value = restWords(%line);
|
||||
|
||||
// See if it's the cursor watch, or from the watch window.
|
||||
if (%id < 0) {
|
||||
DebuggerCursorWatch.setText(DebuggerCursorWatch.expr SPC "=" SPC %value);
|
||||
}
|
||||
else {
|
||||
%row = DebuggerWatchView.getRowTextById(%id);
|
||||
if (%row $= "") {
|
||||
return;
|
||||
}
|
||||
%expr = getField(%row, 0);
|
||||
DebuggerWatchView.setRowById(%id, %expr @ "\t" @ %value);
|
||||
}
|
||||
}
|
||||
|
||||
// Handler for unrecognized response.
|
||||
function TCPDebugger::handleError(%this, %line)
|
||||
{
|
||||
DebuggerConsoleView.print("ERROR - bogus message: " @ %line);
|
||||
}
|
||||
|
||||
// Print a line of response from the server.
|
||||
function DebuggerConsoleView::print(%this, %line)
|
||||
{
|
||||
%row = %this.addRow(0, %line);
|
||||
%this.scrollVisible(%row);
|
||||
}
|
||||
|
||||
// When entry in file list selected, open the file.
|
||||
function DebuggerFilePopup::onSelect(%this, %id, %text)
|
||||
{
|
||||
DbgOpenFile(%text, 0, false);
|
||||
}
|
||||
|
||||
// When entry on call stack selected, open the file and go to the line.
|
||||
function DebuggerCallStack::onAction(%this)
|
||||
{
|
||||
%id = %this.getSelectedId();
|
||||
if (%id == -1) {
|
||||
return;
|
||||
}
|
||||
%text = %this.getRowTextById(%id);
|
||||
%file = getField(%text, 0);
|
||||
%line = getField(%text, 1);
|
||||
|
||||
DbgOpenFile(%file, %line, %id == 0);
|
||||
}
|
||||
|
||||
// Add a breakpoint at the selected spot, if it doesn't already exist.
|
||||
function DebuggerBreakPoints::addBreak(%this, %file, %line, %clear, %passct, %expr)
|
||||
{
|
||||
// columns 0 = line, 1 = file, 2 = expr
|
||||
%textLine = %line @ "\t" @ %file @ "\t" @ %expr @ "\t" @ %passct @ "\t" @ %clear;
|
||||
%selId = %this.getSelectedId();
|
||||
%selText = %this.getRowTextById(%selId);
|
||||
if ((getField(%selText, 0) $= %line) && (getField(%selText, 1) $= %file)) {
|
||||
%this.setRowById(%selId, %textLine);
|
||||
}
|
||||
else {
|
||||
%this.addRow($DbgBreakId, %textLine);
|
||||
$DbgBreakId++;
|
||||
}
|
||||
}
|
||||
|
||||
// Remove the selected breakpoint.
|
||||
function DebuggerBreakPoints::removeBreak(%this, %file, %line)
|
||||
{
|
||||
for (%i = 0; %i < %this.rowCount(); %i++) {
|
||||
%id = %this.getRowId(%i);
|
||||
%text = %this.getRowTextById(%id);
|
||||
if ((getField(%text, 0) $= %line) && (getField(%text, 1) $= %file)) {
|
||||
%this.removeRowById(%id);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove all breakpoints.
|
||||
function DebuggerBreakPoints::clearBreaks(%this)
|
||||
{
|
||||
while (%this.rowCount()) {
|
||||
%id = %this.getRowId(0);
|
||||
%text = %this.getRowTextById(%id);
|
||||
%file = getField(%text, 1);
|
||||
%line = getField(%text, 0);
|
||||
DbgRemoveBreakPoint(%file, %line);
|
||||
}
|
||||
}
|
||||
|
||||
// Go to file & line for the selected breakpoint.
|
||||
function DebuggerBreakPoints::onAction(%this)
|
||||
{
|
||||
%id = %this.getSelectedId();
|
||||
if (%id == -1) {
|
||||
return;
|
||||
}
|
||||
%text = %this.getRowTextById(%id);
|
||||
%line = getField(%text, 0);
|
||||
%file = getField(%text, 1);
|
||||
|
||||
DbgOpenFile(%file, %line, false);
|
||||
}
|
||||
|
||||
// Handle breakpoint removal executed from the file-view GUI.
|
||||
function DebuggerFileView::onRemoveBreakPoint(%this, %line)
|
||||
{
|
||||
%file = $DebuggerFile;
|
||||
DbgRemoveBreakPoint(%file, %line);
|
||||
}
|
||||
|
||||
// Handle breakpoint addition executed from the file-view GUI.
|
||||
function DebuggerFileView::onSetBreakPoint(%this, %line)
|
||||
{
|
||||
%file = $DebuggerFile;
|
||||
DbgSetBreakPoint(%file, %line, 0, 0, true);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
// Various support functions.
|
||||
//---------------------------------------------------------------------------------------------
|
||||
|
||||
// Add a watch expression.
|
||||
function DbgWatchDialogAdd()
|
||||
{
|
||||
%expr = WatchDialogExpression.getValue();
|
||||
if (%expr !$= "") {
|
||||
DebuggerWatchView.setRowById($DbgWatchSeq, %expr @"\t(unknown)");
|
||||
TCPDebugger.send("EVAL " @ $DbgWatchSeq @ " 0 " @ %expr @ "\r\n");
|
||||
$DbgWatchSeq++;
|
||||
}
|
||||
Canvas.popDialog(DebuggerWatchDlg);
|
||||
}
|
||||
|
||||
// Edit a watch expression.
|
||||
function DbgWatchDialogEdit()
|
||||
{
|
||||
%newValue = EditWatchDialogValue.getValue();
|
||||
%id = DebuggerWatchView.getSelectedId();
|
||||
if (%id >= 0) {
|
||||
%row = DebuggerWatchView.getRowTextById(%id);
|
||||
%expr = getField(%row, 0);
|
||||
if (%newValue $= "") {
|
||||
%assignment = %expr @ " = \"\"";
|
||||
}
|
||||
else {
|
||||
%assignment = %expr @ " = " @ %newValue;
|
||||
}
|
||||
TCPDebugger.send("EVAL " @ %id @ " 0 " @ %assignment @ "\r\n");
|
||||
}
|
||||
Canvas.popDialog(DebuggerEditWatchDlg);
|
||||
}
|
||||
|
||||
// Set/change the singular "cursor watch" expression.
|
||||
function DbgSetCursorWatch(%expr)
|
||||
{
|
||||
DebuggerCursorWatch.expr = %expr;
|
||||
if (DebuggerCursorWatch.expr $= "") {
|
||||
DebuggerCursorWatch.setText("");
|
||||
}
|
||||
else {
|
||||
TCPDebugger.send("EVAL -1 0 " @ DebuggerCursorWatch.expr @ "\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
// Connect to the server with the given addr/port/password.
|
||||
function DbgConnect()
|
||||
{
|
||||
%address = DebuggerConnectAddress.getValue();
|
||||
%port = DebuggerConnectPort.getValue();
|
||||
%password = DebuggerConnectPassword.getValue();
|
||||
|
||||
if ((%address !$= "" ) && (%port !$= "" ) && (%password !$= "" )) {
|
||||
TCPDebugger.connect(%address @ ":" @ %port);
|
||||
TCPDebugger.schedule(5000, send, %password @ "\r\n");
|
||||
TCPDebugger.password = %password;
|
||||
}
|
||||
|
||||
Canvas.popDialog(DebuggerConnectDlg);
|
||||
}
|
||||
|
||||
// Put a condition on a breakpoint.
|
||||
function DbgBreakConditionSet()
|
||||
{
|
||||
// Read the condition.
|
||||
%condition = BreakCondition.getValue();
|
||||
%passct = BreakPassCount.getValue();
|
||||
%clear = BreakClear.getValue();
|
||||
if (%condition $= "") {
|
||||
%condition = "true";
|
||||
}
|
||||
if (%passct $= "") {
|
||||
%passct = "0";
|
||||
}
|
||||
if (%clear $= "") {
|
||||
%clear = "false";
|
||||
}
|
||||
|
||||
// Set the condition.
|
||||
%id = DebuggerBreakPoints.getSelectedId();
|
||||
if (%id != -1) {
|
||||
%bkp = DebuggerBreakPoints.getRowTextById(%id);
|
||||
DbgSetBreakPoint(getField(%bkp, 1), getField(%bkp, 0), %clear, %passct, %condition);
|
||||
}
|
||||
|
||||
Canvas.popDialog(DebuggerBreakConditionDlg);
|
||||
}
|
||||
|
||||
// Open a file, go to the indicated line, and optionally select the line.
|
||||
function DbgOpenFile(%file, %line, %selectLine)
|
||||
{
|
||||
if (%file !$= "") {
|
||||
// Open the file in the file view.
|
||||
if (DebuggerFileView.open(%file)) {
|
||||
// Go to the line.
|
||||
DebuggerFileView.setCurrentLine(%line, %selectLine);
|
||||
// Get the breakpoints for this file.
|
||||
if (%file !$= $DebuggerFile) {
|
||||
TCPDebugger.send("BREAKLIST " @ %file @ "\r\n");
|
||||
$DebuggerFile = %file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Search in the fileview GUI.
|
||||
function DbgFileViewFind()
|
||||
{
|
||||
%searchString = DebuggerFindStringText.getValue();
|
||||
DebuggerFileView.findString(%searchString);
|
||||
|
||||
Canvas.popDialog(DebuggerFindDlg);
|
||||
}
|
||||
|
||||
// Set a breakpoint, optionally with condition.
|
||||
function DbgSetBreakPoint(%file, %line, %clear, %passct, %expr)
|
||||
{
|
||||
if (!%clear) {
|
||||
if (%file == $DebuggerFile) {
|
||||
DebuggerFileView.setBreak(%line);
|
||||
}
|
||||
}
|
||||
DebuggerBreakPoints.addBreak(%file, %line, %clear, %passct, %expr);
|
||||
TCPDebugger.send("BRKSET " @ %file @ " " @ %line @ " " @ %clear @ " " @ %passct @ " " @ %expr @ "\r\n");
|
||||
}
|
||||
|
||||
// Remove a breakpoint.
|
||||
function DbgRemoveBreakPoint(%file, %line)
|
||||
{
|
||||
if (%file == $DebuggerFile) {
|
||||
DebuggerFileView.removeBreak(%line);
|
||||
}
|
||||
TCPDebugger.send("BRKCLR " @ %file @ " " @ %line @ "\r\n");
|
||||
DebuggerBreakPoints.removeBreak(%file, %line);
|
||||
}
|
||||
|
||||
// Remove whatever breakpoint is selected in the breakpoints GUI.
|
||||
function DbgDeleteSelectedBreak()
|
||||
{
|
||||
%selectedBreak = DebuggerBreakPoints.getSelectedId();
|
||||
%rowNum = DebuggerBreakPoints.getRowNumById(%selectedWatch);
|
||||
if (%rowNum >= 0) {
|
||||
%breakText = DebuggerBreakPoints.getRowText(%rowNum);
|
||||
%breakLine = getField(%breakText, 0);
|
||||
%breakFile = getField(%breakText, 1);
|
||||
DbgRemoveBreakPoint(%breakFile, %breakLine);
|
||||
}
|
||||
}
|
||||
|
||||
// Send an expression to the server for evaluation.
|
||||
function DbgConsoleEntryReturn()
|
||||
{
|
||||
%msg = DbgConsoleEntry.getValue();
|
||||
if (%msg !$= "") {
|
||||
DebuggerConsoleView.print("%" @ %msg);
|
||||
if (DebuggerStatus.getValue() $= "NOT CONNECTED") {
|
||||
DebuggerConsoleView.print("*** Not connected.");
|
||||
}
|
||||
else if (DebuggerStatus.getValue() $= "BREAK") {
|
||||
DebuggerConsoleView.print("*** Target is in BREAK mode.");
|
||||
}
|
||||
else {
|
||||
TCPDebugger.send("CEVAL " @ %msg @ "\r\n");
|
||||
}
|
||||
}
|
||||
DbgConsoleEntry.setValue("");
|
||||
}
|
||||
|
||||
// Print a line from the server.
|
||||
function DbgConsolePrint(%status)
|
||||
{
|
||||
DebuggerConsoleView.print(%status);
|
||||
}
|
||||
|
||||
// Delete the currently selected watch expression.
|
||||
function DbgDeleteSelectedWatch()
|
||||
{
|
||||
%selectedWatch = DebuggerWatchView.getSelectedId();
|
||||
%rowNum = DebuggerWatchView.getRowNumById(%selectedWatch);
|
||||
DebuggerWatchView.removeRow(%rowNum);
|
||||
}
|
||||
|
||||
// Evaluate all the watch expressions.
|
||||
function DbgRefreshWatches()
|
||||
{
|
||||
for (%i = 0; %i < DebuggerWatchView.rowCount(); %i++) {
|
||||
%id = DebuggerWatchView.getRowId(%i);
|
||||
%row = DebuggerWatchView.getRowTextById(%id);
|
||||
%expr = getField(%row, 0);
|
||||
TCPDebugger.send("EVAL " @ %id @ " 0 " @ %expr @ "\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
// Incremental execution functions
|
||||
// These just send commands to the server.
|
||||
//---------------------------------------------------------------------------------------------
|
||||
function dbgStepIn()
|
||||
{
|
||||
TCPDebugger.send("STEPIN\r\n");
|
||||
}
|
||||
|
||||
function dbgStepOut()
|
||||
{
|
||||
TCPDebugger.send("STEPOUT\r\n");
|
||||
}
|
||||
|
||||
function dbgStepOver()
|
||||
{
|
||||
TCPDebugger.send("STEPOVER\r\n");
|
||||
}
|
||||
|
||||
function dbgContinue()
|
||||
{
|
||||
TCPDebugger.send("CONTINUE\r\n");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue