* debug executions fixes. Testing framework from now support testing then debugging feature.
* fixed bug with NPE then first test fails.
* some testing framework fixes.
diff --git a/core/plugins/org.eclipse.dltk.debug/src/org/eclipse/dltk/internal/debug/core/model/ScriptDebugTarget.java b/core/plugins/org.eclipse.dltk.debug/src/org/eclipse/dltk/internal/debug/core/model/ScriptDebugTarget.java
index 04865f4..a2a8666 100644
--- a/core/plugins/org.eclipse.dltk.debug/src/org/eclipse/dltk/internal/debug/core/model/ScriptDebugTarget.java
+++ b/core/plugins/org.eclipse.dltk.debug/src/org/eclipse/dltk/internal/debug/core/model/ScriptDebugTarget.java
@@ -27,7 +27,6 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.core.runtime.Preferences;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IBreakpointManager;
@@ -39,8 +38,6 @@
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.debug.core.model.IThread;
import org.eclipse.dltk.dbgp.exceptions.DbgpException;
-import org.eclipse.dltk.debug.core.DLTKDebugPlugin;
-import org.eclipse.dltk.debug.core.DebugPreferenceConstants;
import org.eclipse.dltk.debug.core.IDbgpService;
import org.eclipse.dltk.debug.core.model.IScriptDebugTarget;
import org.eclipse.dltk.debug.core.model.IScriptDebugTargetListener;
diff --git a/core/plugins/org.eclipse.dltk.debug/src/org/eclipse/dltk/internal/debug/core/model/ScriptStack.java b/core/plugins/org.eclipse.dltk.debug/src/org/eclipse/dltk/internal/debug/core/model/ScriptStack.java
index 1b469ca..6c88e76 100644
--- a/core/plugins/org.eclipse.dltk.debug/src/org/eclipse/dltk/internal/debug/core/model/ScriptStack.java
+++ b/core/plugins/org.eclipse.dltk.debug/src/org/eclipse/dltk/internal/debug/core/model/ScriptStack.java
@@ -1,5 +1,6 @@
package org.eclipse.dltk.internal.debug.core.model;
+import org.eclipse.dltk.core.DLTKCore;
import org.eclipse.dltk.dbgp.IDbgpStackLevel;
import org.eclipse.dltk.dbgp.commands.IDbgpStatckCommands;
import org.eclipse.dltk.dbgp.exceptions.DbgpException;
@@ -38,7 +39,9 @@
try {
this.frames = readFrames(thread.getDbgpSession().getCoreCommands());
} catch (DbgpException e) {
- // TODO: log exception
+ if (DLTKCore.DEBUG) {
+ e.printStackTrace();
+ }
}
}
diff --git a/core/plugins/org.eclipse.dltk.debug/src/org/eclipse/dltk/internal/debug/core/model/ScriptStackFrame.java b/core/plugins/org.eclipse.dltk.debug/src/org/eclipse/dltk/internal/debug/core/model/ScriptStackFrame.java
index b0f3f3d..74426b7 100644
--- a/core/plugins/org.eclipse.dltk.debug/src/org/eclipse/dltk/internal/debug/core/model/ScriptStackFrame.java
+++ b/core/plugins/org.eclipse.dltk.debug/src/org/eclipse/dltk/internal/debug/core/model/ScriptStackFrame.java
@@ -21,9 +21,11 @@
import org.eclipse.debug.core.model.IRegisterGroup;
import org.eclipse.debug.core.model.IThread;
import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.dltk.core.DLTKCore;
import org.eclipse.dltk.dbgp.IDbgpProperty;
import org.eclipse.dltk.dbgp.IDbgpStackLevel;
import org.eclipse.dltk.dbgp.commands.IDbgpContextCommands;
+import org.eclipse.dltk.dbgp.exceptions.DbgpDebuggingEngineException;
import org.eclipse.dltk.dbgp.exceptions.DbgpException;
import org.eclipse.dltk.debug.core.DLTKDebugPlugin;
import org.eclipse.dltk.debug.core.DebugPreferenceConstants;
@@ -49,16 +51,23 @@
ScriptStackFrame parentFrame, int contextId,
IDbgpContextCommands commands) throws DbgpException {
- IDbgpProperty[] properties = commands.getContextProperties(parentFrame
- .getLevel(), contextId);
+ try {
+ IDbgpProperty[] properties = commands.getContextProperties(
+ parentFrame.getLevel(), contextId);
- IScriptVariable[] variables = new IScriptVariable[properties.length];
+ IScriptVariable[] variables = new IScriptVariable[properties.length];
- for (int i = 0; i < properties.length; ++i) {
- variables[i] = new ScriptVariable(parentFrame, properties[i]);
+ for (int i = 0; i < properties.length; ++i) {
+ variables[i] = new ScriptVariable(parentFrame, properties[i]);
+ }
+
+ return variables;
+ } catch (DbgpDebuggingEngineException e) {
+ if (DLTKCore.DEBUG) {
+ e.printStackTrace();
+ }
+ return new IScriptVariable[0];
}
-
- return variables;
}
protected IScriptVariable[] readAllVariables() throws DbgpException {