java - How to make an Eclipse debug launcher that launches a Class -


I am trying to create an Eclipse Launch Configuration, which I can launch programmatically, if you wish Can create custom debugger

I already got a org.eclipse.debug.core.launch configuration type extension, as well as .core.launchDelegates , < Code>. Ui.launchConfigurationTabGroups and .core.sourcePathComputers extensions.

I have a button that executes the following code:

  ILAnchManager MGR = debug plugin.gate default (). GetLaunchManager (); Type Alok Configuration lct = mgr.getLaunchConfigurationType (IOpcodeConstants.LAUNCH_CFG_TYPE); Alok Configuration [] lcs = mgr.getLaunchConfigurations (lct); (Int i = 0; i & lt; lcs.length; ++ i) {if (lcs [i] .getName (.) Equals ("opcode")) {lcs [i] .delete (); break; }} ILAnch Configuration Working Coord wc = lct.newInstance (blank, "opcode"); Set up & lt; String & gt; Mode = New Hashet & lt; String & gt; (); Modes.add (ILaunchManager.DEBUG_MODE); Wc.setModes (mode); Wc.setPreferredLaunchDelegate (mode, "nz.net.fantail.studio.opcodeLaunchDelegate"); Alok Configuration LC = wc.doSave (); Lc.launch (ILOUCH Manager. DEBUGMODE, blank);  

The representative of my launch has the following code:

  @Override Public Zero Launch (Ailek Configuration Configuration, String Mode, Idea Launch, IPRog Monitor Monitor) CoreException throws {management client client = new management client ("localhost", 6961); If (mode.equals (ILaunchManager.DEBUG_MODE)) {IDebugTarget target = New OpcodeDebugTarget (Launch, Client); Launch.addDebugTarget (target); }}  

Everything works fine until the management client tries to load the class and throws a noch-specific diff exposition. I suspect this because it launches from a real application in a different environment and as such it does not have .jar with orbit in its class.

How do anyone get this issue? Cheers!

Is not a class, management client or something else? You may have to set yourself to the goal cell in your launch configuration.

  // Optimize Classpath wc.setAttribute (IJavaLaunchConstigerationConstants.ATTR_DEFAULT_CLASSPATH, incorrect); Wc.setAttribute (IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, Classpathist);  

Here are some other settings that may be useful:

  wc.setAttribute (IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName); Wc.setAttribute (IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, targetMainClass); Wc.setAttribute (IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, ProgramArg); Wc.setAttribute (IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, jvmArgs);  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -