스크립트 디버깅 가이드
이 화면은 스크립트 디버깅에 대한 샘플 화면이다.
예시
화면 스크립트
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
function screen_on_load() { cbo_datalog.setselectedcode(factory.getxtrandatalog()); cbo_datalogshowtype.setselectedcode(factory.getxtrandatalogshowtype()); } // "라인 디버깅 시작" 버튼 이벤트 function btnLineDebug_on_mouseup(objInst) { var ret; // 전용브라우저 및 범용 브라우저의 개발자 도구창이 표시되어 있는 상태에서 // 라인디버깅을 지정하기 위한 예약어 지정 debugger; factory.consoleprint( "Call TR_SELECT Transaction" ); // 직원나이 필드값 콘솔에 표시 factory.consoleprint( "직원나이 = " + fldAge.gettext()); // ASYNC 처리, 처리 완료시 "on_submitcomplete" 이벤트가 발생함 ret = screen.requestsubmit( "TR_SELECT" , true ); factory.consoleprint( "requestsubmit() Return Value = " + ret); } // requestsubmit 처리 완료 이벤트 function screen_on_submitcomplete(mapid, result, recv_userheader, recv_code, recv_msg) { factory.consoleprint( "mapid = " + mapid + ", result = " + result); } // "데이터 통신 로그 콘솔 표시 옵션 설정" 버튼 이벤트 function btn_setxtrandatalog_on_mouseup(objInst) { // xFrame5 콘솔창에 송수신 데이터 로깅 옵션 설정 factory.setxtrandatalog(cbo_datalog.getselectedcode()); } function btn_setxtrandatashowtype_on_mouseup(objInst) { factory.setxtrandatalogshowtype(cbo_datalogshowtype.getselectedcode()); } // "전용 브라우저 개발자 도구 표시" 버튼 이벤트 function btnShowDevTools_on_mouseup(objInst) { // 전용브라우저 환경에서 전용브라우저 개발자 콘솔 표시 처리 factory.showdevtools( true ); // 전용브라우저 및 범용 브라우저의 개발자 콘솔에 메시지 표시 console.log( "write log message to browser devtool console" ); } // "전용 브라우저 개발자 도구 숨김" 버튼 이벤트 function btnHideDevTools_on_mouseup(objInst) { // 전용브라우저 환경에서 전용브라우저 개발자 콘솔 숨김 처리 factory.showdevtools( false ); } // "xFrame5 콘솔창 표시" 버튼 이벤트 function btnShowConsole_on_mouseup(objInst) { // xFrame5 콘솔 트레이스 표시 factory.showconsoletrace( true ); factory.consoleprint( "xFrame5 콘솔창에 메시지 표시" ); } // "xFrame5 JSONView 팝업창 표시" 버튼 이벤트 function btnShowJsonViewPopup_on_mouseup(objInst) { // xFrame5 콘솔 트레이스 표시 factory.showjsonviewpopup(); } // "xFrame5 콘솔창 숨김" 버튼 이벤트 function btnHideConsole_on_mouseup(objInst) { // xFrame5 콘솔 트레이스 숨김 factory.showconsoletrace( false ); } // "데이터셋 로그(DS_EMP_AGE)" 버튼 이벤트 function btnXDataSetLog0_on_mouseup(objInst) { // xFrame5 콘솔창의 "xdataset0" 영역에 데이터 셋 내용 출력 factory.consoleprintxdataset(DS_EMP_AGE, 0); } // "데이터셋 로그(DS_EMP_LIST)" 버튼 이벤트 function btnXDataSetLog1_on_mouseup(objInst) { // xFrame5 콘솔창의 "xdataset1" 영역에 데이터 셋 내용 출력 factory.consoleprintxdataset(DS_EMP_LIST, 1); } // "타임 로그" 버튼 이벤트 function btnTimeLog_on_mouseup(objInst) { var row, col; var row_count, col_count; var arrRowData; // 처리 시각 로깅 시작 위치 지정 factory.consoletimestart( "GRID_LOOP" ); row_count = grdList.getrowcount(); col_count = grdList.getcolumncount(); for (row = 0; row < row_count; row++) { arrRowData = []; for (col = 0; col < col_count; col++) { arrRowData.push(grdList.getitemtext(row, col)); } factory.consoleprint( "ROW[" + row + "] Data = " + arrRowData.join( "," )); } // 처리 시각 로깅 끝 위치 지정 및 "time" 로그 영역에 경과 시각 로깅 출력 factory.consoletimeend( "GRID_LOOP" ); } // "xFrame5 콘솔 메시지 출력" 버튼 이벤트 function btnPrintConsoleMsg_on_mouseup(objInst) { // xFrame5 콘솔창이 표시된 상태에서만 동작한다. // xFrame5 콘솔창이 표시 처리는 factory.showconsoletrace API를 통해서 수행한다. factory.consoleprint( "xFrame5 콘솔창 출력 메시지" ); } // "브라우저 콘솔 메시지 출력" 버튼 이벤트 function btnPrintBrowserConsoleMsg_on_mouseup(objInst) { // 범용/전용 브라우저의 개발자 도구창에 표시된 상태에서만 동작한다. // 전용 브라우저의 개발자 도구창 표시 처리는 factory.showdevtools API를 통해서 수행한다. console.log( "브라우저 콘솔 출력 메시지" ); console.error( "브라우저 콘솔 출력 메시지" ); } // "서비스 호출 처리 시간 로깅" 버튼 이벤트 function btnTranTimeLog_on_mouseup(objInst) { // 처리 시각 로깅 끝 위치 지정 및 "time" 로그 영역에 경과 시각 로깅 출력 factory.consoleprinttran(screen, "TR_SELECT" ); } function screen_on_destroy() { alert( "1" ); return 1; } function btnShowXTranLogPopup_on_mouseup(objInst) { var bModal = false ; factory.loadpopup( "XTRANLOG" , "/SYS/UTIL/XTranLog" , "XTRANLOG" , false , XFD_BORDER_RESIZE, 0, 0, true , bModal, screen); } |