CN105468511A - Web page script error positioning method and apparatus - Google Patents

Web page script error positioning method and apparatus Download PDF

Info

Publication number
CN105468511A
CN105468511A CN201410453078.9A CN201410453078A CN105468511A CN 105468511 A CN105468511 A CN 105468511A CN 201410453078 A CN201410453078 A CN 201410453078A CN 105468511 A CN105468511 A CN 105468511A
Authority
CN
China
Prior art keywords
script
code
source program
program
shell script
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410453078.9A
Other languages
Chinese (zh)
Inventor
陈成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201410453078.9A priority Critical patent/CN105468511A/en
Publication of CN105468511A publication Critical patent/CN105468511A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

Embodiments of the present invention provide a web page script error positioning method and apparatus. The method comprises: acquiring error information of a web page script, wherein the error information comprises location information of an error code occurring in the running of a script program; and according to the location information, querying an association relationship table between the script program and a source program so as to determine a location of a code corresponding to the error code occurring in the running of the script program in the source program. An embodiment of the present invention also provides a web page script error positioning apparatus.

Description

Page script location of mistake method and device
Technical field
The application relates to network technology, particularly relates to a kind of page script location of mistake method and device.
Background technology
Page script program adopts script, the program that such as JavaScript, VBScript etc. write, and it can may operate in browser without compiling, and application widely.The one that page script can be used as webpage is effectively supplementary, provides some specific functions, when running in a browser, can improve web page browsing speed, strengthens webpage, the such as performance of video, animation, sound etc.
Because webpage function complexity is various, when shell script runs in webpage, the situation of mistake may be there is, page script program occurs that mistake will have influence on the expression effect of webpage, even affect the normal operation of webpage, therefore, need to detect the ruuning situation of page script program in webpage, the mistake of Timeliness coverage page script program.
Summary of the invention
The embodiment of the present application provides a kind of location of mistake method and device of page script, when mistake appears in script, can accurately orient the position of code corresponding in the source program of script.
On the one hand, the embodiment of the present application provides a kind of page script location of mistake method, comprising:
Obtain the error message of page script, described error message comprises in script program operation the positional information of the code occurring mistake;
According to described positional information, query script program and the incidence relation table between source program are determined to occur the position of the code that the code of mistake is corresponding in described source program with described shell script;
Wherein, described shell script is the program of source program after conversion, and described incidence relation table record has the corresponding relation of code between source program and shell script.
On the one hand, the embodiment of the present application provides a kind of page script location of mistake device, comprising:
Acquisition module, for obtaining the error message of page script, described error message comprises in script program operation the positional information occurring error code;
Processing module, for according to described positional information, query script program and the incidence relation table between source program are determined to occur the position of the code that the code of mistake is corresponding in described source program with described script program operation;
Wherein, described shell script is the program of source program after conversion, and described incidence relation table record has the corresponding relation of code between source program and shell script.
The embodiment of the present application technical scheme, when mistake appears in script program operation process, can orient the position of code corresponding with there is the code of mistake in script program operation in source program in time, accurately.
Accompanying drawing explanation
In order to the technical scheme of the embodiment of the present application is clearly described, below the accompanying drawing used required in describing the embodiment of the present application is briefly described, apparently, the accompanying drawing that the following describes is only some embodiments in the application, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings of the embodiment of the present application.
The process flow diagram of a kind of page script location of mistake method that Fig. 1 provides for the embodiment of the present application;
The structural representation of a kind of page script location of mistake system that Fig. 2 provides for the embodiment of the present application;
The process flow diagram of a kind of page script location of mistake method that Fig. 3 provides for the embodiment of the present application;
The structural representation of a kind of page script location of mistake device that Fig. 4 provides for the embodiment of the present application.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present application, be clearly and completely described the technical scheme in the application, obviously, described embodiment is only a part of embodiment of the application, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all belong to the scope of the application's protection.
Page script usually can by application program, and such as browser, calls and perform, all kinds of script is widely used in webpage design, because script not only can reduce the scale of webpage and improve web page browsing speed, and can enrich the performance of webpage, as animation, sound etc.Such as, can check that when list ACK button in webpage clicking whether user name, mailbox etc. that user inputs be correct, and provide prompting in real time, the function in these webpages is realized by shell script.
Page script is by scripting language, script is that one can without traditional computer language, the language such as such as C++ carry out compiling the application program that just can be performed, the page script program of scripting language can not need compiling and directly be performed by application program, can directly exist in the form of text, application program can carry out invoke script program according to the operation of user or the operation of self, then the code in Run Script program, the code performed wherein similarly is call a kind of order.
In order to promote website stability; usually to the page script run on webpage, such as, can be monitored by the JavaScript script of JavaScript scripting language, collect the error message of script emerged in operation; to modify to shell script in time, avoid the operation affecting website.In the embodiment of the present application, if be not particularly illustrated, be all be described with JavaScript script, other scripts certainly, such as, by the VBScript script etc. of VBScript scripting language, have same or similar implementation procedure.
The relative general procedure exploitation of shell script relatively natural language; can perform without compiling but explaining; be beneficial to fast Development; but due in safety, performance, the page script operated at present in the application programs such as browser can once be changed usually; namely the source program that scripting language goes out is utilized; after conversion, form the shell script that can be performed, the shell script of browser execution is just through the program after conversion.Here for the ease of understanding, in the embodiment of the present application, the program of unconverted after scripting language is called source program, the program of source program after conversion is called shell script.
Wherein, described conversion can be specifically compressing and converting, is not limited to compressing and converting in certain practical application, and compressing and converting method can have multiple, such as, by compression methods such as uglifyjs, yuicompressor.When script is compressed, can be compression variable name, such as source program " varfoo=1; Alert (foo); " shell script " vara=1 can be compressed into; Alert (a); ", be compressed into a by variable foo, can certainly compress function name etc., and go the compressions such as space, etc.Other conversion method can have same or similar effect.
The instantiation of shell script will be converted to be described the conversion of script below with source program:
Such as, source program is:
functionfoo(){
bar();
}
Shell script after compressing and converting is:
(function(){functiona(){b()};})();
In this conversion, be that the variable foo in source program is compressed into a, bar is compressed into b, and is removed in the space in source program; With the addition of a function simultaneously, namely in outside nested one from performing function, to improve the security of program.
When obtaining script error information based on existing script monitoring, the position of the code occurring mistake in script program operation can only be obtained, and cannot determine to change the front corresponding position of code in script source program, must modify to script source program when repairing mistake, this just needs programming personnel or maintainer by virtue of experience, or the mode that simulation makes mistakes is to determine error reason, find errors present corresponding in source program.In some cases, the real source program position occurring mistake, location is very difficult, particularly along with engineering becomes increasingly complex, carry out the errors present of Wrong localization in source program by manual type and become more difficult, such as, in some webpages, need to process some very complicated mutual (these are realized by shell script alternately), (namely a page comprises multiple project in even more complicated single page application, be together in series by script between project), when there is mistake in the script in these webpages, according to existing script method for supervising, be difficult to orient errors present corresponding to source program code, or it is longer to expend time in.
In the technical scheme that the embodiment of the present application provides, can according to the positional information of script program operation mistake, by searching the mode of the incidence relation table between shell script and source program, determine the position occurring the code that the code of mistake is corresponding in source program in script program operation, like this, programming personnel can be convenient to or maintainer orients in source program the code position occurring mistake in time, effectively can improve accuracy, the reliability of location of mistake, in time shell script be repaired.Technical scheme is applicable to be needed, in the monitoring of the script of conversion, accurately to orient the position of code corresponding to script error.
The process flow diagram of a kind of page script location of mistake method that Fig. 1 provides for the embodiment of the present application.In the embodiment of the present application, shell script can be embedded in web page program, when user uses browser access webpage, browser can call and perform shell script, when in the operational process of shell script at browser, there is run-time error, browser can Real-time Collection error message, and can by error message real-time report to script server, and this page script location of mistake method just may operate on this script server, particularly, this location of mistake method can comprise:
The error message of step 101, acquisition page script, this error message can comprise in script program operation the positional information occurring mistake;
Step 102, according to this positional information, the incidence relation table between query script program and source program, determines the position of code corresponding with there is the code of mistake in script program operation in source program.
In the embodiment of the present application, shell script is the program of source program after conversion, and such as, by compressing and converting, shell script here specifically can refer to JavaScript program.Incidence relation table between shell script and source program is the table of the corresponding relation recording code between source program and shell script, this incidence relation table can be source program is being converted to the table generated in shell script process, can be stored on script server in the mode of file.
In the embodiment of the present application, script server can safeguard various shell script, programming personnel or maintainer can carry out the maintenance of script on this script server, such as based on the page script error message that browser is offered, shell script can be safeguarded, code revision, issue etc.
In the embodiment of the present application, in browser, accessible site has the module of resolving shell script, such as JavaScript script analytics engine, when webpage runs in a browser, when needing to perform shell script, this script analytics engine can be utilized to carry out invoke script program, perform shell script and complete specific function, such as authentication of users account etc.
In the embodiment of the present application, browser can monitor the shell script that it runs in real time, when script program operation mistake, just can by error message, such as during script program operation mistake, there is the positional information of the code of mistake, specifically can comprise the line number of code, row number; Meanwhile, this error message also can comprise the fileinfo that script version information etc. identifies shell script, and this version information can be specifically the information such as the numbering of script, so that script server can identify based on this script information the script gone wrong.In addition, error message can also comprise browser type, screen size etc., and these information can as the reference of mis repair code.
In the embodiment of the present application, browser is as the application program of Run Script program, and on it, accessible site has monitoring script program run-time error, and collects the functional module of error message, such as, be integrated with the window.onerror interface of this function.When there is mistake in browser execution shell script, error event will be triggered, the position of the code of mistake will be there is in window.onerror based on the Code obtaining of shell script, such as line number, row number etc., and other information, these other information can comprise the information such as browser type, screen size, can be not limited to these information in practical application, can obtain the various information relevant to script program operation mistake according to actual needs.
In the embodiment of the present application, browser can based on the information on website, or information when performing script, and when determining that mistake appears in script, the address of the script server reported, to be uploaded to script server by script error information in real time.In one implementation, one section can be inserted in the head of web page program (head) portion and perform script error monitoring, and report the error message of script to a function of script server, such as:
Wherein, window.onerror is the interface that browser program self provides, this all has setting at the browser program of routine, this interface can obtain script error information when browser performs script error, and includes server address in above-mentioned function, therefore, browser is when opening webpage, first can perform the above-mentioned function of webpage head, thus can window.onerror interface monitoring in a browser to script run-time error time, just error message can be sent to server.Can find out, browser is when opening webpage, and because above-mentioned function is inserted in webpage head, therefore browser will perform above-mentioned function when performing webpage, error message also, when monitoring appearance mistake, just can report by shell script in browser execution webpage in time.
In practical application, also the mode of the head imbedding function of webpage can not be limited to, such as can by issuing the mode of plug-in unit, when user opens default webpage by browser, plug-in unit will collect the script error information that the window.onerror interface monitoring on browser is arrived, and carries out being reported to the server of specifying in plug-in unit; Or also can carry out monitoring script mistake by plug-in unit, and carry out reporting of error message.
In the embodiment of the present application, after script server receives the script error information that browser reports, just can be preserved in a database, and in a step 101, this error message is obtained from database, determine that in error message, the positional information of mistake appears in script, in a step 102, just can according to error message, incidence relation table between query script program and source program, thus the position occurring the code that the code of mistake is corresponding with shell script can be found out in source program, there is the program code position of mistake in location in source program, so that programming personnel or maintainer repair code.In the present embodiment, script server can orient in source program the position of the program code occurring mistake automatically based on step 101 and step 102, and the mode such as view, file can notify and show programming personnel or maintainer to process, like this, the accuracy and efficiency that code is repaired can be improved.
In the embodiment of the present application, script server can be previously stored with between shell script and source program to incidence relation table, this incidence relation table can be specifically convert in the process of shell script at source program to set up, it can be the file automatically created, such as can be described as Map file, can associate with source program and/or shell script and store.In practical application, this incidence relation table also can be that application developer converts in shell script process at source program, manual creation, is not particularly limited in specific implementation process.
In one implementation, this incidence relation table can be specifically the table of the corresponding relation of the position recording code between source program and shell script, namely after this incidence relation table record has the every line code in source program to convert shell script to, position in shell script, make the code in source program all can be corresponding with the code in shell script, like this, in above-mentioned steps 102, script server is based on when occurring in shell script that the positional information of mistake inquires about incidence relation table, just can based on the position of code occurring mistake in shell script, before inquiry obtains the code conversion of this mistake, position in source program, programming personnel or maintainer just can determine the code occurring mistake in source program the very first time, and then can analyze code, determine the reason occurring mistake, code is modified or adjusts, realize the reparation to shell script.
In one implementation, in incidence relation table, have recorded the corresponding relation of the keyword of code between shell script and source program, the position relationship between the program code just can determine therebetween by the keyword that inquiry is corresponding therebetween.Particularly, convert in shell script process at source program, by analyzing the keyword in source program and shell script, such as grammer keyword or attribute keywords, and the keyword of record is associated, like this, when there is the position of the program of mistake when to get in script program operation wrong for script server, just can analyze the keyword of this location procedure code, and inquire about incidence relation table based on this keyword, obtain the keyword that source program is corresponding, and then determine in source program there is mistake with this shell script code between corresponding code, orient in source program the position of the program code occurring mistake.
In one implementation, have recorded the position at source program and shell script before and after the keyword conversion in source program in incidence relation table, to realize the corresponding relation of the code between source program and shell script.Before source program converts shell script to, first can analyze the keyword in source program, such as the keyword such as attribute, variable; Source program is being converted in the process of shell script, can based on the keyword in source program, come before and after the conversion of recorded key word in the position of the code of source program and shell script, like this, behind the position of code obtaining shell script appearance mistake, just based on the position relationship recorded in incidence relation table, the position of code corresponding in source program can be determined.
Such as, one section of code in the source program of a script is:
vara=1;
window.a=2;
Code in shell script after compressing and converting is:
vara=1;window.a=2;
So by analyzing above-mentioned code, the keyword that can obtain in source program is [" a ", " window "], and wherein, a and window in vara just belongs to variable, and window is global variable, and a in window.a just belongs to the attribute on variable.Corresponding relation in the incidence relation table so generated is exactly:
Can finding out, by setting up the position before and after the keyword conversion in source program in source program and shell script, just based on the position occurring wrong code during script program operation, the position of code corresponding in source program can be determined.Because shell script occurs that the code of mistake is bound to include the key word information such as variable, therefore, the incidence relation table based on the position recording keyword is the position can determining code in source program accurately.
In one implementation, in incidence relation table, have recorded the corresponding relation of the keyword of code between shell script and source program, the position relationship between the program code just can determine therebetween by the keyword that inquiry is corresponding therebetween.Particularly, convert in shell script process at source program, by analyzing the keyword in source program and shell script, such as grammer keyword or attribute keywords, and the keyword of record is associated, like this, when there is the position of the program of mistake when to get in script program operation wrong for script server, just can analyze the keyword of this location procedure code, and inquire about incidence relation table based on this keyword, obtain the keyword that source program is corresponding, and then determine in source program there is mistake with this shell script code between corresponding code, orient in source program the position of the program code occurring mistake.
Several implementations of the above-mentioned corresponding relation to code between source program and shell script are illustrated, above-mentioned several mode can be not limited in actual applications, as long as according to the code of shell script, code corresponding in conversion source program can be oriented.
In the embodiment of the present application, after program developer utilizes scripting language to complete source program, just can convert source program to shell script, and the incidence relation table in transfer process between generation script program and source program, then, can shell script be carried in web page program, when user is browsed web sites by browser, can trigger or start corresponding shell script by the operation web page page, Run Script program, in the process, if there is mistake in script program operation, will collect shell script occur mistake positional information, such as occur the line number of the code of mistake, row number etc. positional information, and the fileinfo of shell script etc., and error message is uploaded to script server, after script server receives error message, just can remind to developer or maintainer, such as play window mode etc., simultaneously, script server also can automatically according to the positional information in error message, and the incidence relation table between the shell script prestored and source program, obtain in source program the position corresponding to code corresponding to program code that shell script makes mistakes, and by this position with information prompting mode to developer or maintainer, such developer or maintainer just can based on this informations, code is modified or adjusts, and convert the source program after remodifying to shell script, and release.
For the reciprocal process between user, script server, technical scheme will be described below.
As shown in Figure 2, be the system architecture schematic diagram of the embodiment of the present application method practical application.In this system, user can utilize and be arranged on browser in the terminal such as PC or mobile phone to browse webpage, user is when browsing webpage, browser meeting real-time collecting script run-time error information, and error message can be reported script server, as shown in Figure 3, for user in PC, browse webpage time, the process flow diagram of page script location, specifically can comprise:
Step 201, user are by the browser access webpage in PC;
Step 202, browser, in user operation process, can call and perform JavaScript program;
Step 203, when JavaScript program occur mistake time, browser can record comprise script version information, the line number of makeing mistakes and row number etc. error message;
Error message can be sent to script server by PC by step 204, browser automatically;
After step 205, script server receive rub-out signal, according to version information determine occur mistake script, and obtain comprising the line number of makeing mistakes and row number positional information;
Step 206, script server can according to positional informations, and the incidence relation table between the source program stored and shell script, and location occurs that the code of the shell script of mistake corresponds to the position of the code in source program.
Script server just can inform maintainer by modes such as announcement informations, so that maintainer repairs shell script in time, to recover the normal operation of webpage after obtaining the position of the code of the shell script occurring mistake.Meanwhile, browser relevant information can be comprised in the error message reported on a web browser, such as version number etc., and display information, the size of such as display, and the details occurring mistake, concrete network address of the user such as logged in, access etc.Like this, maintainer just can determine the reason of mistake based on these information, to make correct correcting strategy.
Wherein, programming personnel, after writing script, can convert script source program to shell script, and records the incidence relation table between source program and shell script, and is stored in script server.
The structural representation of a kind of page script location of mistake device that Fig. 4 provides for the embodiment of the present application.As shown in Figure 4, this locating device can comprise acquisition module 10 and processing module 20, wherein:
Acquisition module 10, for obtaining the error message of page script, described error message comprises in script program operation the positional information occurring mistake;
Processing module 20, for according to described positional information, query script program and the incidence relation table between source program are determined to occur the position of the code that the code of mistake is corresponding in described source program with described script program operation.
Wherein, described shell script is the program of source program after conversion, and described incidence relation table record has the corresponding relation of code between source program and shell script.
The locating device that the embodiment of the present application provides can be the script server in said method, it can realize the collection to script error information, after receiving script error information, just can obtain error message by acquisition module 10, and determined the position of code in corresponding source program by processing module 20, and then provide foundation for programming personnel or maintainer carry out reparation to script.Can with reference to the explanation in said method to the process of script error location.
In device shown in Fig. 4, described positional information can comprise line number, the row number of shell script.Certainly, also other information can be comprised, the fileinfo of the identifiable design shell scripts such as such as script version information.Etc..
In the embodiment of the present application, above-mentioned incidence relation table is transfer in the process of shell script at source program setting up.
In the embodiment of the present application, in above-mentioned incidence relation table, specifically can record the corresponding relation of the position of code between source program and shell script.Or, also can be have recorded the position at source program and shell script before and after the keyword conversion in source program in described incidence relation table.Or, also can be the corresponding relation of the keyword of code between record source program and shell script.Explanation during its specific implementation can realize see said method.
In the embodiment of the present application, the processing module 20 shown in Fig. 4, specifically can be used for, according to described positional information, determining the keyword of the program code that this positional information is corresponding in described shell script; And for based on described keyword, inquire about the incidence relation table between described shell script and source program, determine to correspond to the code of described keyword in described source program, so determine in described source program with there is the position that the position of mistake is corresponding in described script program operation.
In the embodiment of the present application, above-mentioned script server or page script location of mistake device, can be specifically a computing equipment, in one typically configuration, computing equipment can comprise one or more processor (CPU), input/output interface, network interface and internal memory.Wherein, processor can realize function or the step of above-mentioned each module by performing the executable program stored in internal memory, input/output interface, network interface can realize the communication between miscellaneous equipment, script error information that such as, browser on reception subscriber equipment reports etc.
Internal memory may comprise the volatile memory in computer-readable medium, and the forms such as random access memory (RAM) and/or Nonvolatile memory, as ROM (read-only memory) (ROM) or flash memory (flashRAM).Internal memory is the example of computer-readable medium.
Computer-readable medium comprises permanent and impermanency, removable and non-removable media can be stored to realize information by any method or technology.Information can be computer-readable instruction, data structure, the module of program or other data.The example of the storage medium of computing machine comprises, but be not limited to phase transition internal memory (PRAM), static RAM (SRAM), dynamic RAM (DRAM), the random access memory (RAM) of other types, ROM (read-only memory) (ROM), Electrically Erasable Read Only Memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc ROM (read-only memory) (CD-ROM), digital versatile disc (DVD) or other optical memory, magnetic magnetic tape cassette, tape magnetic rigid disk stores or other magnetic storage apparatus or any other non-transmitting medium, can be used for storing the information can accessed by computing equipment.According to defining herein, computer-readable medium does not comprise of short duration computer readable media (transitorymedia), as data-signal and the carrier wave of modulation.
Wherein, the modules of the application's device can be integrated in one, and also can be separated deployment.Above-mentioned module can merge into a module, also can split into multiple submodule further.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the application can add required general hardware platform by software and realize, and can certainly pass through hardware, but in a lot of situation, the former is better embodiment.Based on such understanding, the technical scheme of the application can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform method described in each embodiment of the application.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the module in accompanying drawing or flow process might not be that enforcement the application is necessary.
It will be appreciated by those skilled in the art that the module in the device in embodiment can carry out being distributed in the device of embodiment according to embodiment description, also can carry out respective change and be arranged in the one or more devices being different from the present embodiment.The module of above-described embodiment can merge into a module, also can split into multiple submodule further.
Above-mentioned the embodiment of the present application sequence number, just to describing, does not represent the quality of embodiment.
Be only several specific embodiments of the application above, but the application is not limited thereto, the changes that any person skilled in the art can think of all should fall into the protection domain of the application.

Claims (16)

1. a page script location of mistake method, is characterized in that, comprising:
Obtain the error message of page script, described error message comprises in script program operation the positional information of the code occurring mistake;
According to described positional information, query script program and the incidence relation table between source program are determined to occur the position of the code that the code of mistake is corresponding in described source program with described shell script;
Wherein, described shell script is the program of source program after conversion, and described incidence relation table record has the corresponding relation of code between source program and shell script.
2. method according to claim 1, is characterized in that, described positional information comprises line number, the row number of shell script.
3. method according to claim 1, is characterized in that, described error message also comprises the version information of shell script.
4. method according to claim 1, is characterized in that, described incidence relation table is be converted in the process of shell script at source program to set up.
5. method according to claim 1, is characterized in that, have recorded the corresponding relation of the position of code between source program and shell script in described incidence relation table.
6. method according to claim 1, is characterized in that, have recorded the position at source program and shell script before and after the keyword conversion in source program in described incidence relation table.
7. method according to claim 1, is characterized in that, have recorded the corresponding relation of the keyword of code between source program and shell script in described incidence relation table.
8. method according to claim 7, it is characterized in that, described according to described positional information, the incidence relation table between query script program and source program, determine in described source program with the position occurring the code that the code of mistake is corresponding in described shell script, comprising:
According to described positional information, determine the keyword of the program code that this positional information is corresponding in described shell script;
Based on described keyword, inquire about the incidence relation table between described shell script and source program, determine to correspond to the code of described keyword in described source program, so determine in described source program with the position occurring the code that the code of mistake is corresponding in described script program operation.
9. a page script location of mistake device, is characterized in that, comprising:
Acquisition module, for obtaining the error message of page script, described error message comprises in script program operation the positional information occurring error code;
Processing module, for according to described positional information, query script program and the incidence relation table between source program are determined to occur the position of the code that the code of mistake is corresponding in described source program with described shell script;
Wherein, described shell script is the program of source program after conversion, and described incidence relation table record has the corresponding relation of code between source program and shell script.
10. device according to claim 9, is characterized in that, described positional information comprises line number, the row number of shell script.
11. devices according to claim 9, is characterized in that, described error message also comprises the version information of shell script.
12. devices according to claim 9, is characterized in that, described incidence relation table is be converted in the process of shell script at source program to set up.
13. devices according to claim 9, is characterized in that, have recorded the corresponding relation of the position of code between source program and shell script in described incidence relation table.
14. devices according to claim 9, is characterized in that, have recorded in described incidence relation table keyword in source program before switching after in the position of source program and shell script.
15. devices according to claim 9, is characterized in that, have recorded the corresponding relation of the keyword of code between source program and shell script in described incidence relation table.
16. devices according to claim 15, is characterized in that, described processing module, specifically for according to described positional information, determine the keyword of the program code that this positional information is corresponding in described shell script;
And for based on described keyword, inquire about the incidence relation table between described shell script and source program, determine to correspond to the code of described keyword in described source program, so determine in described source program with the position occurring the code that the code of mistake is corresponding in described script program operation.
CN201410453078.9A 2014-09-05 2014-09-05 Web page script error positioning method and apparatus Pending CN105468511A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410453078.9A CN105468511A (en) 2014-09-05 2014-09-05 Web page script error positioning method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410453078.9A CN105468511A (en) 2014-09-05 2014-09-05 Web page script error positioning method and apparatus

Publications (1)

Publication Number Publication Date
CN105468511A true CN105468511A (en) 2016-04-06

Family

ID=55606242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410453078.9A Pending CN105468511A (en) 2014-09-05 2014-09-05 Web page script error positioning method and apparatus

Country Status (1)

Country Link
CN (1) CN105468511A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106874137A (en) * 2017-03-16 2017-06-20 深圳市茁壮网络股份有限公司 A kind of JS engine fault-tolerants method and apparatus
WO2017107808A1 (en) * 2015-12-21 2017-06-29 阿里巴巴集团控股有限公司 Method and system for locating obfuscated scripting language
CN108268332A (en) * 2017-08-10 2018-07-10 广州神马移动信息科技有限公司 Webpage abnormality monitoring method, equipment and system
CN108664250A (en) * 2018-03-27 2018-10-16 北京奇艺世纪科技有限公司 A kind of code process method and device
CN109409399A (en) * 2018-08-23 2019-03-01 深圳点猫科技有限公司 A kind of script error book of final entry method and electronic equipment based on educational system
CN110287056A (en) * 2019-07-04 2019-09-27 郑州悉知信息科技股份有限公司 Webpage error message acquisition methods and device
CN111722904A (en) * 2020-06-22 2020-09-29 深圳前海微众银行股份有限公司 Page alarm script generation method, device, equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114253A (en) * 2006-07-26 2008-01-30 腾讯科技(深圳)有限公司 Program crashing information report method and system thereof
CN102681929A (en) * 2011-03-15 2012-09-19 腾讯科技(深圳)有限公司 Webpage script error monitoring method and system
US20140059112A1 (en) * 2008-06-03 2014-02-27 International Business Machines Corporation Automated correction and reporting for dynamic web applications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114253A (en) * 2006-07-26 2008-01-30 腾讯科技(深圳)有限公司 Program crashing information report method and system thereof
US20140059112A1 (en) * 2008-06-03 2014-02-27 International Business Machines Corporation Automated correction and reporting for dynamic web applications
CN102681929A (en) * 2011-03-15 2012-09-19 腾讯科技(深圳)有限公司 Webpage script error monitoring method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
阮一峰: ""JavaScript Source Map详解"", 《HTTP://WWW.CSDN.NET/ARTICLE/2013-01-25/2813953-JAVASCRIPT-SOURCE-MAP》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017107808A1 (en) * 2015-12-21 2017-06-29 阿里巴巴集团控股有限公司 Method and system for locating obfuscated scripting language
CN106874137A (en) * 2017-03-16 2017-06-20 深圳市茁壮网络股份有限公司 A kind of JS engine fault-tolerants method and apparatus
CN108268332A (en) * 2017-08-10 2018-07-10 广州神马移动信息科技有限公司 Webpage abnormality monitoring method, equipment and system
CN108664250A (en) * 2018-03-27 2018-10-16 北京奇艺世纪科技有限公司 A kind of code process method and device
CN109409399A (en) * 2018-08-23 2019-03-01 深圳点猫科技有限公司 A kind of script error book of final entry method and electronic equipment based on educational system
CN110287056A (en) * 2019-07-04 2019-09-27 郑州悉知信息科技股份有限公司 Webpage error message acquisition methods and device
CN110287056B (en) * 2019-07-04 2023-04-28 郑州悉知信息科技股份有限公司 Webpage error information acquisition method and device
CN111722904A (en) * 2020-06-22 2020-09-29 深圳前海微众银行股份有限公司 Page alarm script generation method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN105468511A (en) Web page script error positioning method and apparatus
CN111522922B (en) Log information query method and device, storage medium and computer equipment
WO2021088724A1 (en) Testing method and apparatus
CN106656536B (en) Method and equipment for processing service calling information
CN109684847B (en) Automatic repairing method, device, equipment and storage medium for script loopholes
CN109376291B (en) Website fingerprint information scanning method and device based on web crawler
CN106649061B (en) Method and equipment for recording operation log of user in web system
US9417991B2 (en) Translation verification testing
CN107085549B (en) Method and device for generating fault information
US8682935B2 (en) System and method for application navigation
CN104348658A (en) Fault report generation method and system thereof
CN107003931B (en) Decoupling test validation from test execution
CN107480036A (en) Automatic test approach, device, storage medium and the terminal of iOS Mobile solutions
CN103577310A (en) Method and device for recording software debugging logs
WO2017107808A1 (en) Method and system for locating obfuscated scripting language
CN113987393A (en) Web page operation recorder, system, device and method
CN112925757A (en) Method, equipment and storage medium for tracking operation log of intelligent equipment
CN106682210B (en) Log file query method and device
CN113485909B (en) Test method, test device, computing equipment and medium
CN111026637B (en) Method and device for positioning problem code
US11106571B2 (en) Identification of input object in a graphical user interface
CN116070049B (en) Method, device and equipment for backtracking page data and readable storage medium
US8489444B2 (en) Chronicling for process discovery in model driven business transformation
CN115757174A (en) Database difference detection method and device
CN112162954B (en) User operation log generation and path positioning method, device, equipment and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160406

RJ01 Rejection of invention patent application after publication