Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 269794
Collapse All | Expand All

(-)src/org/eclipse/jst/server/generic/core/internal/ExternalLaunchConfigurationDelegate.java (-3 / +4 lines)
Lines 137-153 Link Here
137
		}
137
		}
138
138
139
		if (mode.equals("debug")) { //$NON-NLS-1$
139
		if (mode.equals("debug")) { //$NON-NLS-1$
140
			ILaunchConfigurationWorkingCopy wc = createDebuggingConfig(configuration);
140
			ILaunchConfigurationWorkingCopy wc = createDebuggingConfig(configuration, server);
141
			// if we're launching the debugging we need to wait for the config to start
141
			// if we're launching the debugging we need to wait for the config to start
142
			// before launching the debugging session
142
			// before launching the debugging session
143
			serverBehavior.setDebuggingConfig(wc, mode, launch, monitor);
143
			serverBehavior.setDebuggingConfig(wc, mode, launch, monitor);
144
		}
144
		}
145
	}
145
	}
146
146
147
	private ILaunchConfigurationWorkingCopy createDebuggingConfig(ILaunchConfiguration configuration) 
147
	private ILaunchConfigurationWorkingCopy createDebuggingConfig(ILaunchConfiguration configuration, IServer server) 
148
	throws CoreException {
148
	throws CoreException {
149
        ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy();
149
        ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy();
150
        setDebugArgument(wc, IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, "hostname", "localhost");  //$NON-NLS-1$//$NON-NLS-2$
150
        String hostname = server.getHost();
151
        setDebugArgument(wc, IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, "hostname", hostname);  //$NON-NLS-1$//$NON-NLS-2$
151
        String port = configuration.getAttribute(DEBUG_PORT, (String) null);
152
        String port = configuration.getAttribute(DEBUG_PORT, (String) null);
152
        if (port==null || port.length()==0) {
153
        if (port==null || port.length()==0) {
153
        	abort(GenericServerCoreMessages.debugPortUnspecified, null, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);
154
        	abort(GenericServerCoreMessages.debugPortUnspecified, null, IJavaLaunchConfigurationConstants.ERR_INTERNAL_ERROR);

Return to bug 269794