IntelliJ Debugging in 7.7

Following the guides on Debugging in IntelliJ https://docs.inductiveautomation.com:8443/display/SE/Debugging+in+IntelliJ I managed to get the gateway debugging working just fine.

I got stuck at the Client / Designer debugging though, and my error doesn't seem to match the other posts.

I am currently trying it out with the ignition-sdk-examples -> Component Example -> client-launcher and client-designer maven modules
This is an Ignition 7.7.5 install on my local machine
I am using IntelliJ IDEA 2016.3.2
I am using maven to build and install with integration-test

Creating an Application Run Configuration as instructed, putting the "VM arguments" provided in the 'VM Options' tab (although also trying it in the 'Program Arguments' tab with no success) and trying to debug the component example gives me:

So my question comes down to:
a) Can I still use the debugger in 7.7?
b) If so, should I be using the same main class?
c) If yes to both, then where else may I have missed something?

I think we’re missing a dependency in the SDK. In the meantime, try adding this to your client launcher pom.xml file:

<dependency>
    <groupId>com.inductiveautomation.ignition</groupId>
    <artifactId>client-bootstrap</artifactId>
    <version>SDK_VERSION_HERE</version>
</dependency>

After looking closer at it I realized that the “Use classpath of module” dropdown didn’t contain the options “client-launcher” or “designer-launcher” - just “ignition-sdk-examples”.
I tried applying the same initial instructions to one of my own 7.7 modules and that gave me the correct options so I continued from here instead of using ignition-sdk-examples.

Adding the client bootstrap dependency to my client-launcher.pom made a little more progress but I ended up running into the following shortly after the client looked like it was starting up

[quote]
com.inductiveautomation.ignition.client.launch.steps.HttpResponseException: 400: Unknown Version
at com.inductiveautomation.ignition.client.launch.steps.DownloadProjectStep.download(DownloadProjectStep.java:240)
at com.inductiveautomation.ignition.client.launch.steps.DownloadProjectStep.download(DownloadProjectStep.java:189)
at com.inductiveautomation.ignition.client.launch.steps.DownloadProjectStep.downloadStartingFrom(DownloadProjectStep.java:101)
at com.inductiveautomation.ignition.client.launch.steps.DownloadProjectStep.evaluateCacheAndDownload(DownloadProjectStep.java:56)
at com.inductiveautomation.ignition.client.launch.steps.DownloadProjectStep.run(DownloadProjectStep.java:38)
at com.inductiveautomation.ignition.client.launch.AbstractStepRunner.run(AbstractStepRunner.java:32)
at java.lang.Thread.run(Thread.java:745)[/quote]

I have tried the two following version values, in case I was missing something, but the same problem for both.

[quote]7.7.1
7.7.5[/quote]

Adding the same dependency to the designer-launcher just to see how it behaved, despite you not mentioning it explicitly, did get me further as well.
Debugging brought up the designer, allowed me to log in and select a project, but when trying to open a project I get caught at the Loading page "Starting module: "

The IntelliJ console outputs the following error:

[quote]Exception in thread “Designer-Startup” java.lang.NoClassDefFoundError: com/inductiveautomation/vision/api/client/AbstractClientModuleHook
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.kymera.designer.components..DesignerHook.startup(DesignerHook.java:23)
at com.inductiveautomation.ignition.designer.IgnitionDesigner$LoadedModule.startup(IgnitionDesigner.java:1745)
at com.inductiveautomation.ignition.designer.IgnitionDesigner.startupModule(IgnitionDesigner.java:951)
at com.inductiveautomation.ignition.designer.IgnitionDesigner.loadProject(IgnitionDesigner.java:829)
at com.inductiveautomation.ignition.designer.IgnitionDesigner$StartupProjectDialogHandler$1.run(IgnitionDesigner.java:1817)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.inductiveautomation.vision.api.client.AbstractClientModuleHook
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 19 more[/quote]

You need to use the client-launcher or designer-launcher as the classpath when launching. If you can’t select either it probably means you haven’t actually imported those modules into IntelliJ.

After reimporting the folders as modules into IntelliJ I was able to select the classpath with the ignition-sdk-examples as well.
I also decided to switch to a 7.7.8 Ignition install, just in case that makes a difference.

Trying the designer-launcher now brings up the log in prompt, but I am unable to log in with default admin account (see attached error if you wish). I am still able to log in when launching the designer from the downloaded designer.jnlp
[attachment=1]designer-launcher-login-fail.txt[/attachment]

Trying the client-launcher yields the follow error (see the full error in the attached log)

[attachment=0]client-launcher-error.txt[/attachment]

Just pinging this thread once more in case anyone has an idea. I have not made any progress beyond my last post.

Hi jake.brand,
I would like to know how you achieve to debug the gateway script. I’m trying to make it work unsuccessfully.
I managed to configure the debug profile but never stops on the breakpoints. Ignition is installed on my local machine as well as IntelliJ.

I use:
IntelliJ 2018.1.5
Ignition 7.9.8

Thanks for the help