How to debug a solution on mobile 1C:Enterprise platform

Setting up and connecting the debugger for debugging configurations on the mobile platform.

Introduction.

This was my first experience with the new debugging mechanism, which first appeared on the platform 8.3.7 (debug via HTTP).

What we need for this exercise:

  • Desktop platform 1C:Enterprise 8.3 (8.3.8.2054)
  • Mobile Platform 8.3.9.66 (beta)
  • Windows Server 2012 R2 Standard + Apache 2.2
  • Android 6.0.1 (Sony Z5 compact)

Note. For the purity of the experiment, I always recommend using a clean server with a static external IP. For example, Amazon Cloud (AWS) or Microsoft Azure Cloud provide you new server in minutes that is ideal for testing. It will cost you no more than $10-20.

Step 1. Create a simple configuration for the mobile platform.
1
Step 2. Create a common command with a simple code.
2
Step 3. We publish mobile configuration on the Web server.

Note. I assume that you already have experience in publishing databases on the web server 1C in general and mobile configurations in particular so I don’t cover how to install and configure Apache and security/network.

3
Step 4. Set up parameters in the Debug menu - Tools - Options - Debug. Restart Designer.
Debug Protocol should be set up as “Debug over HTTP.” Debug Server as “use local debug server”. Local NIC address - specify the IP address of your server’s network card. Port ranger - any free port, for example 50007.
4
5
Step 5. Verify your current debugger setting - Debug - Connection - Setting.
6
Step 6. Configure automatic attachment to the debugger - Debug - Connection - Autoattach.
7
Step 7. Check the debugger in a browser on the local server (the same place where was launched Designer with the debugger).
8
Step 8. Open debug port on Firewall (specified by us in Step 4) for external access.
9
Step 9. Check the debugger in the browser from another computer.
10
Step 10. In a mobile application on a smartphone add a new configuration.
11
Step 11. Set up debug server address (from step 5).
12
Step 12. Check if our common command works.
13
14
Step 13. Put a breakpoint and run the command again.
15
Hopefully, this mini-guide will help you to configure debugging for your mobile solution and make it easier to develop new applications for mobile devices. Questions are welcome in comments.

Click to rate this post!
[Total: 0 Average: 0]

Leave a Reply

Your email address will not be published. Required fields are marked *