-
Notifications
You must be signed in to change notification settings - Fork 73
Closed
Description
While developing 0.6 a problem occurred that was not before.
When launching Node.js for .js file
More details from Error Log
Related code
import org.nodeclipse.ui.Activator;
import org.nodeclipse.ui.preferences.PreferenceConstants;
public class NodeDebugUtil {
private static final String CONFIG_NAME = "STANDALONE_V8";
//public static final String LAUNCH_CONFIGURATION_TYPE_ID = "org.chromium.debug.ui.LaunchType$StandaloneV8";
private static final String LAUNCH_CONFIGURATION_TYPE_ID = "org.nodeclipse.debug.launch.LaunchType$StandaloneV8";
public static void launch(final String mode, ILaunch launch,
IProgressMonitor monitor) throws CoreException {
ILaunchConfigurationType type = DebugPlugin
.getDefault()
.getLaunchManager()
.getLaunchConfigurationType(LAUNCH_CONFIGURATION_TYPE_ID);
if (type != null) {
ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(
null, CONFIG_NAME);
workingCopy.setAttribute("debug_host", "localhost");
//workingCopy.setAttribute("debug_port", 5858);
IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore();
int nodeDebugPort = preferenceStore.getInt(PreferenceConstants.NODE_DEBUG_PORT);
if (nodeDebugPort==0) { nodeDebugPort=5858;};
workingCopy.setAttribute("debug_port", nodeDebugPort);
final ILaunchConfiguration config = workingCopy.doSave();
// super.launch(config, mode, launch, monitor);
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
DebugUITools.launch(config, mode);
}
});
}
}
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.swt.widgets.Display;
public class NodeDebugUtil {
private static final String CONFIG_NAME = "STANDALONE_V8";
// public static final String LAUNCH_CONFIGURATION_TYPE_ID =
// "org.chromium.debug.ui.LaunchType$StandaloneV8";
private static final String LAUNCH_CONFIGURATION_TYPE_ID = "org.nodeclipse.debug.launch.LaunchType$StandaloneV8";
public static void launch(final String mode, ILaunch launch,
IProgressMonitor monitor) throws CoreException {
ILaunchConfigurationType type = DebugPlugin.getDefault()
.getLaunchManager()
.getLaunchConfigurationType(LAUNCH_CONFIGURATION_TYPE_ID);
if (type != null) {
ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(
null, CONFIG_NAME);
workingCopy.setAttribute("debug_host", "localhost");
workingCopy.setAttribute("debug_port", 5858);
final ILaunchConfiguration config = workingCopy.doSave();
// super.launch(config, mode, launch, monitor);
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
DebugUITools.launch(config, mode);
}
});
}
}
Reactions are currently unavailable

