The invention relates to a method and a
system for complementing and diagnosing codes for
secondary development of a Web end, the
system comprises a
code editor, an adapter and at least one language
server, and the following steps are executed: an initialization communication request comprises initial document content of the
code editor, a
workspace selected by a user and a
working directory; the language service loads and analyzes the configuration file according to the address of the
workspace so as to configure behaviors of a
compiler and create a compiling service object; after the adapter monitors the change of the
code editor, a request is generated, the language service updates the document content in the request to the virtual file object, then a compiling service object is called, an
abstract syntax tree is established according to the document content in the virtual file object and a
working directory, and error diagnosis is carried out; and generating an error diagnosis result and / or reading a language standard
library, and obtaining an interface prompt. The method has the advantages that more comprehensive interface prompt, code completion and error diagnosis are provided, the code error rate is reduced, and the development efficiency is improved.