Ignition 8 Designer Debugging not working

ignition80
#1

I’m trying to debug the Ignition 8 Designer in IntelliJ like I used to with Ignition 7. I re-followed the instructions at https://docs.inductiveautomation.com/display/SE/Debugging+in+IntelliJ but what I observe is that IntelliJ successfully launches the designer but it looks like a child process is spawned and the parent process exits, which causes IntelliJ to think everything’s over with.

The last few lines of the IntelliJ console are as follows:

Running: [C:\Users\mark_\.ignition\cache\resources\runtimes\11.0.3\bin\java.exe, -cp, C:\Users\mark_\.ignition\cache\launchclient_ADF54DE0.jar, -Dia.retarget.token=ADF54DE0, -Djavaws.sr.memory.init=64M, -Djavaws.sr.memory.max=256M, -Djavaws.sr.platform.edition=null, -Xms64M, -Xmx256M, com.inductiveautomation.ignition.client.launch.BootstrapSwing]
Launched JVM.
Disconnected from the target VM, address: '127.0.0.1:52871', transport: 'socket'

Process finished with exit code 0
0 Likes

#2

This may be due to the way that we handle launching on the correct JVM downloaded from the gateway you are targeting. if you add the -Djavaws.sr.runtimeOverride=true argument when launching then the Designer will use whatever JDK you are targeting and not relaunch on the JRE grabbed from the gateway.

It should also be noted that you should be using some JDK 11+ version.

Thanks,
Jonathan C

0 Likes

#3

Thanks @jcoffman, that got me a little farther. Now the problem I’m running into is that the console output is showing a version mismatch error in the logs, which I can’t explain. I’ve verified that the version of Ignition I’m running is the same as the Ignition SDK version (8.0.2). Any hints? Here’s the output from the IntelliJ console:

ignition-designer.log (51.0 KB)

Last few lines:

Starting class: com.inductiveautomation.ignition.designer.DesignerStartupHook
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by de.javasoft.plaf.synthetica.SyntheticaLookAndFeel (file:/C:/Users/mark_/.m2/repository/de/javasoft/synthetica/3.1.1/synthetica-3.1.1.jar) to method sun.swing.DefaultLookup.setDefaultLookup(sun.swing.DefaultLookup)
WARNING: Please consider reporting this to the maintainers of de.javasoft.plaf.synthetica.SyntheticaLookAndFeel
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
11:18:14.460 [Thread-3] INFO com.inductiveautomation.ignition.client.gateway_interface.GatewayConnectionManager - Initializing gateway connection with URLs: [http://127.0.0.1:8088/main]
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Version mismatch
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:341)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:315)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:268)
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.invoke(GatewayInterface.java:905)
	at com.inductiveautomation.ignition.designer.DesignerStartupHook.initI18N(DesignerStartupHook.java:342)
	at com.inductiveautomation.ignition.designer.DesignerStartupHook.startup(DesignerStartupHook.java:277)
	at com.inductiveautomation.ignition.client.launch.steps.StartupStep$Starter.run(StartupStep.java:126)
	at java.base/java.lang.Thread.run(Thread.java:834)
0 Likes

#4

Try dropping the extra qualifiers from the gateway address; eg:
-Djavaws.sr.gateway.addr.0=127.0.01:8088:8043/main
down to:
-Djavaws.sr.gateway.addr.0=127.0.01:8088

1 Like

#5

Do you have this arg: -Dscadarail.version=dev?

1 Like

#6

@PGriffith I tried the modification you suggested, I still get the same error.

@Kevin.Herron I made sure that arg is present.

Any other ideas?

0 Likes

#7

I tried starting from “scratch” using the gateway-network-function project from the ignition-sdk-examples repo, and I was able to get a little farther but I can’t log in with the designer, I see this error in the debugger:

12:38:43.611 [Thread-3] INFO com.inductiveautomation.ignition.client.gateway_interface.GatewayConnectionManager - Initializing gateway connection with URLs: [http://127.0.01:8088/main]
12:38:43.746 [Thread-3] INFO com.inductiveautomation.ignition.client.util.gui.progress.ClientProgressManager - Progress manager started.
12:38:48.226 [AWT-EventQueue-0] ERROR com.inductiveautomation.ignition.designer.DesignerSplash - Login failed.
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Unable to read response from Gateway.

I think at this point it’s probably best that an Inductive Automation person confirm that they can run through the public instructions and get IntelliJ debugging working and update the knowledgebase / examples appropriately. We know for sure that the -Djavaws.sr.runtimeOverride=true is a new flag that must be added with Ignition 8.0.

0 Likes

#8

I just updated the vision-component example.

I was able to successfully launch a designer against an Ignition 8.0.2 gateway with the following configuration:

Main Class: com.inductiveautomation.ignition.designer.DesignerStartupHook

VM Options:

-Dignition.version=dev
-Dsr.gateway=localhost:8088/main
-DlibPath=/home/kevin/.ignition/cache/gwlocalhost_8088_main/C0/pylib

Use classpath of module: designer-launcher

0 Likes

#9

Thanks @Kevin.Herron, that gets me a little farther but I’m still stuck:

I can now get to the Open/Create Project dialog, but when I try to either open an existing project or create a new one, I get this error:

(I also get about 10 to 13 errors like Hook class "com.inductiveautomation.symfact.designer.SymbolFactoryDesignerHook" not found for module "Symbol Factory" but I’m able to ignore those to get to the Open/Create Project dialog.)

0 Likes

#10

That error should be solved by the -DlibPath line. Did you point that to a valid pylib folder on your machine?

0 Likes

#11

You might also just scrap this whole approach and launch a regular Designer via the Designer Launcher with additional arguments to enable remote debugging:

-Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=*:8000

and then attach via IntelliJ.

0 Likes

#12

Success! I just needed to make sure that libPath was correct. Now I need to figure out why my module isn’t being loaded, but that’s a separate problem.

0 Likes

#13

I tried using the Designer Launcher approach you suggested but I can’t seem to specify the arguments correctly. I put them on separate lines, but I get the following error. The text entry box doesn’t allow me to insert a space anywhere so I’m not sure what else to do.

0 Likes

#14

Try getting rid of -Xdebug and just using the other line.

I think the launcher’s handling of multiple arguments in that text area is broken.

0 Likes

#15

No luck:

0 Likes

#16

@Kevin.Herron my next hurdle is to get the Ignition Vision client to run in the debugger… do you know what magic to do for that?

0 Likes