Client Diagnostics / Console

Is there a command or keyboard shortcut to open the client diagnostics console from a button/script? The only way i’m aware of getting to it is by enabling the client menubar and then navigating to Help>Diagnostics.

This would be really handy, since for all my clients, I hide the menubar. If we could pop up the diagnostics utility from a button, or even embed a console into a page, that would be fantastic.

This is answered in Launch Diagnostics/Console From Client. Use this script:

from com.inductiveautomation.factorypmi.application import FPMIApp
FPMIApp.getInstance().showFPMIDiagnostics()

Sorry for necrobumping, but I want to make sure I can quickly find the answer the next time I search for this and for whatever reason I found this thread with my initial searches but not the other thread.

Or, y’know, system.gui.openDiagnostics - Ignition User Manual 8.1 - Ignition Documentation… man, what was that guy in 2018 thinking :slight_smile:

1 Like

Is there a way (either with Robot or through script) to select console once diagnostics is open?

from java.awt import Window

# Returns the first nested component of a given class
# container = The object containing nested components to be recursively searched
# className = the __name__ of the class given as a string
def findComponentOfClass(container, className):
	for component in container.components:
		if component.__class__.__name__ == className:
			return component
		else:
			foundComponent = findComponentOfClass(component, className)
			if foundComponent:
				return foundComponent

# Programatically open a diagnostic window, find it, and set it to the console tab
system.gui.openDiagnostics()
for window in Window.getWindows():
	if window.__class__.__name__ == 'DefaultPopupWindowParent':
		diagnosticDialog = findComponentOfClass(window, 'DiagnosticsDialog')
		if diagnosticDialog:
			tabbedPane = findComponentOfClass(diagnosticDialog, 'JTabbedPane')
			tabbedPane.selectedIndex = tabbedPane.indexOfTab('Console')

neat, thank you so much @justinedwards.jle