Debugging in the Client

Hi everyone,

This has come up a few times, and we’ve finally added how to do this into the Programmer’s guide. Just thought I’d post so it was here as well.

To debug client scoped code (in the designer or a client), you can create an Eclipse launch profile that launches one of those directly. This is all done in Eclipse:

Step 1 - Create a new Java Application Launch Profile
Under Run>Debug Configurations, create a new “Java Application” profile for your project.
Set “Main Class” to: [tt]com.inductiveautomation.ignition.client.launch.BootstrapSwing[/tt]

Step 2 - Add the Ignition launch jar
Click on the debug profile’s “Classpath” tab
Select “Bootstrap Entries” and click “Add External JARs”
Locate “launchclient.jar” under “{InstallDir}\lib\core\launch”

Step 3 - Set up VM arguments
Click on the “Arguments” tab.
In the “VM arguments” section:

For Debugging in the Designer:

-Djavaws.sr.gateway.addr.0=127.0.01:8088:8043/main -Djavaws.sr.launchts=1304953567471 -Djavaws.sr.scope=D -Djavaws.sr.main=com.inductiveautomation.ignition.designer.DesignerStartupHook -Djavaws.fpmi.debug=true

For Debugging in the Client:

-Djavaws.sr.gateway.addr.0=127.0.01:8088:8043/main -Djavaws.sr.scope=C -Djavaws.sr.main=com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook -Djavaws.fpmi.debug=true -Djavaws.sr.project=ProjectName
Remember: Set the last parameter, “project”, to your correct project name.

When you run this config profile, the client or designer will be launched, and the project you specified under the “Main” tab will be debuggable.