Setting up and connecting the debugger for debugging configurations on the mobile platform.
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 (126.96.36.1994)
- Mobile Platform 188.8.131.52 (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.
Step 2. Create a common command with a simple code.
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.
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.
Step 5. Verify your current debugger setting - Debug - Connection - Setting.
Step 6. Configure automatic attachment to the debugger - Debug - Connection - Autoattach.
Step 7. Check the debugger in a browser on the local server (the same place where was launched Designer with the debugger).
Step 8. Open debug port on Firewall (specified by us in Step 4) for external access.
Step 9. Check the debugger in the browser from another computer.
Step 10. In a mobile application on a smartphone add a new configuration.
Step 11. Set up debug server address (from step 5).
Step 12. Check if our common command works.
Step 13. Put a breakpoint and run the command again.
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.