Question:
I need to debug code which is using web client specific functional such as asynchronous form behavior. How can I debug the web client?
Answer:
1C: Enterprise Platform allows for debugging of the web client. Assuming that you have already published your database to web server, you should take the following steps to debug the web client.
1- While in the designer, Debug -> Attach for debugging… -> Settings… -> Debugger: Note the value here, it will be used in the second step.
2- Administration -> Publish to web server… -> Other settings -> Debugging: Depending on the Debugger, choose Allowed (TCP/IP) or Allowed (HTTP).
3- Administration -> Publish to web server… -> Other settings -> Debugger address: Simply copy/paste here the value of Debugger from the first step.
4- While the designer is open, in the web browser address bar write the standard string for connecting to the database followed by a “?debug” string. After hitting Enter, just log in to the database with your user name and password.
5- While in the designer, Debug -> Attach for debugging… : In the upper “Available debug items” table, you should be seeing the web client item. Double click on it so that it gets attached (appears in the lower “Attached debug items” table). Close the “Attach for debugging” window.
6- That’s all, now the execution of the code should stop at the breakpoints.