aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwgalanciak2013-11-06 18:34:45 (EST)
committerwgalanciak2013-11-06 18:34:45 (EST)
commit94b33cc94525675aecdea8e1749ea9c60f0fc15c (patch)
treea80beabd34746ce67068b4a8f5a58c298c9585fb
parent604ae7f74515079f77ff46efcb429146257c350a (diff)
downloadorg.eclipse.pdt-94b33cc94525675aecdea8e1749ea9c60f0fc15c.zip
org.eclipse.pdt-94b33cc94525675aecdea8e1749ea9c60f0fc15c.tar.gz
org.eclipse.pdt-94b33cc94525675aecdea8e1749ea9c60f0fc15c.tar.bz2
Bug 402734 - Xdebug, string value over 1024 cannot be displayed inrefs/changes/58/18158/1
Expressions view Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=402734 Change-Id: I9b78bd876a4b4affeea7b2e04cfaff4ff14e6022 Signed-off-by: wgalanciak <wojciech.galanciak@gmail.com>
-rw-r--r--plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/PHPDebugCoreMessages.java2
-rw-r--r--plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/PHPDebugCoreMessages.properties1
-rw-r--r--plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/XDebugPreferenceMgr.java13
-rw-r--r--plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/DBGpPreferences.java2
-rw-r--r--plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/XDebugConfigurationDialog.java10
-rw-r--r--plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/model/DBGpTarget.java12
6 files changed, 40 insertions, 0 deletions
diff --git a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/PHPDebugCoreMessages.java b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/PHPDebugCoreMessages.java
index 2c1cf8c..919b90b 100644
--- a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/PHPDebugCoreMessages.java
+++ b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/PHPDebugCoreMessages.java
@@ -121,6 +121,8 @@ public class PHPDebugCoreMessages extends NLS {
// proxy
public static String XDebugConfigurationDialog_useProxy;
public static String XDebugConfigurationDialog_idekey;
+
+ public static String XDebugConfigurationDialog_MaxData;
public static String XDebugConfigurationDialog_proxy;
// General XDebug messages
diff --git a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/PHPDebugCoreMessages.properties b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/PHPDebugCoreMessages.properties
index 6186c06..4a0ce33 100644
--- a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/PHPDebugCoreMessages.properties
+++ b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/PHPDebugCoreMessages.properties
@@ -83,6 +83,7 @@ XDebugConfigurationDialog_capture_copy=copy
XDebugConfigurationDialog_capture_redirect=redirect
XDebugConfigurationDialog_useProxy=Use Proxy
XDebugConfigurationDialog_idekey=IDE Key
+XDebugConfigurationDialog_MaxData=Max data
XDebugConfigurationDialog_proxy=Proxy Address (host:port)
XDebugMessage_debugError=Debugger Error
XDebugMessage_unexpectedTermination=Unexpected termination of script, debugging ended.
diff --git a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/XDebugPreferenceMgr.java b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/XDebugPreferenceMgr.java
index aa38083..a6b13d5 100644
--- a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/XDebugPreferenceMgr.java
+++ b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/XDebugPreferenceMgr.java
@@ -31,6 +31,8 @@ public class XDebugPreferenceMgr {
+ ".xdebug_arrayDepth"; //$NON-NLS-1$
public static final String XDEBUG_PREF_CHILDREN = PHPDebugPlugin.ID
+ ".xdebug_children"; //$NON-NLS-1$
+ public static final String XDEBUG_PREF_DATA = PHPDebugPlugin.ID
+ + ".xdebug_data"; //$NON-NLS-1$
public static final String XDEBUG_PREF_MULTISESSION = PHPDebugPlugin.ID
+ ".xdebug_multisession"; //$NON-NLS-1$
public static final String XDEBUG_PREF_REMOTESESSION = PHPDebugPlugin.ID
@@ -82,6 +84,7 @@ public class XDebugPreferenceMgr {
useMultiSessionDefault());
prefs.setDefault(XDebugPreferenceMgr.XDEBUG_PREF_CHILDREN,
getChildrenDefault());
+ prefs.setDefault(XDebugPreferenceMgr.XDEBUG_PREF_DATA, getDataDefault());
prefs.setDefault(XDebugPreferenceMgr.XDEBUG_PREF_REMOTESESSION,
getAcceptRemoteSessionDefault());
@@ -112,6 +115,9 @@ public class XDebugPreferenceMgr {
preferences
.getDefaultInt(XDebugPreferenceMgr.XDEBUG_PREF_CHILDREN));
preferences
+ .setValue(XDebugPreferenceMgr.XDEBUG_PREF_DATA, preferences
+ .getDefaultInt(XDebugPreferenceMgr.XDEBUG_PREF_DATA));
+ preferences
.setValue(
XDebugPreferenceMgr.XDEBUG_PREF_MULTISESSION,
preferences
@@ -173,6 +179,9 @@ public class XDebugPreferenceMgr {
sessionPrefs.setValue(DBGpPreferences.DBGP_MAX_CHILDREN_PROPERTY,
maxChildren);
+ int maxData = uiPrefs.getInt(XDebugPreferenceMgr.XDEBUG_PREF_DATA);
+ sessionPrefs.setValue(DBGpPreferences.DBGP_MAX_DATA_PROPERTY, maxData);
+
boolean getSuperGlobals = uiPrefs
.getBoolean(XDebugPreferenceMgr.XDEBUG_PREF_SHOWSUPERGLOBALS);
sessionPrefs.setValue(DBGpPreferences.DBGP_SHOW_GLOBALS_PROPERTY,
@@ -244,6 +253,10 @@ public class XDebugPreferenceMgr {
return DBGpPreferences.DBGP_MAX_CHILDREN_DEFAULT;
}
+ private static int getDataDefault() {
+ return DBGpPreferences.DBGP_MAX_DATA_DEFAULT;
+ }
+
private static int getPortDefault() {
return DBGpPreferences.DBGP_PORT_DEFAULT;
}
diff --git a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/DBGpPreferences.java b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/DBGpPreferences.java
index 1ea055f..d9a8864 100644
--- a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/DBGpPreferences.java
+++ b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/DBGpPreferences.java
@@ -24,6 +24,7 @@ public class DBGpPreferences {
public static final int DBGP_MAX_CHILDREN_DEFAULT = 31;
public static final boolean DBGP_SHOW_GLOBALS_DEFAULT = true;
public static final int DBGP_CAPTURE_DEFAULT = 0;
+ public static final int DBGP_MAX_DATA_DEFAULT = 1024;
// define the session property keys
public static final String DBGP_MAX_DEPTH_PROPERTY = "MaxDepth"; //$NON-NLS-1$
@@ -31,6 +32,7 @@ public class DBGpPreferences {
public static final String DBGP_MAX_CHILDREN_PROPERTY = "MaxChildren"; //$NON-NLS-1$
public static final String DBGP_CAPTURE_STDOUT_PROPERTY = "CaptureStdout"; //$NON-NLS-1$
public static final String DBGP_CAPTURE_STDERR_PROPERTY = "CaptureStderr"; //$NON-NLS-1$
+ public static final String DBGP_MAX_DATA_PROPERTY = "MaxData"; //$NON-NLS-1$
private Map preferences = new HashMap();
diff --git a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/XDebugConfigurationDialog.java b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/XDebugConfigurationDialog.java
index 5c6e0a2..9d65889 100644
--- a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/XDebugConfigurationDialog.java
+++ b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/XDebugConfigurationDialog.java
@@ -42,6 +42,7 @@ public class XDebugConfigurationDialog extends
private Button showGlobals;
private Spinner variableDepth;
private Spinner maxChildren;
+ private Spinner maxData;
private Button useMultiSession;
private Combo acceptRemoteSession;
@@ -108,6 +109,12 @@ public class XDebugConfigurationDialog extends
maxChildren = addVariableLevel(mainSubSection,
XDebugPreferenceMgr.XDEBUG_PREF_CHILDREN, 1, 500, 2);
+ addLabelControl(mainSubSection,
+ PHPDebugCoreMessages.XDebugConfigurationDialog_MaxData,
+ XDebugPreferenceMgr.XDEBUG_PREF_DATA);
+ maxData = addVariableLevel(mainSubSection,
+ XDebugPreferenceMgr.XDEBUG_PREF_DATA, 1, Integer.MAX_VALUE, 2);
+
useMultiSession = addCheckBox(mainSubSection,
PHPDebugCoreMessages.XDebugConfigurationDialog_useMultisession,
XDebugPreferenceMgr.XDEBUG_PREF_MULTISESSION, 0);
@@ -257,6 +264,8 @@ public class XDebugConfigurationDialog extends
variableDepth.getSelection());
prefs.setValue(XDebugPreferenceMgr.XDEBUG_PREF_CHILDREN, maxChildren
.getSelection());
+ prefs.setValue(XDebugPreferenceMgr.XDEBUG_PREF_DATA,
+ maxData.getSelection());
prefs.setValue(XDebugPreferenceMgr.XDEBUG_PREF_MULTISESSION,
useMultiSession.getSelection());
prefs.setValue(XDebugPreferenceMgr.XDEBUG_PREF_REMOTESESSION,
@@ -301,6 +310,7 @@ public class XDebugConfigurationDialog extends
.getInt(XDebugPreferenceMgr.XDEBUG_PREF_ARRAYDEPTH));
maxChildren.setSelection(prefs
.getInt(XDebugPreferenceMgr.XDEBUG_PREF_CHILDREN));
+ maxData.setSelection(prefs.getInt(XDebugPreferenceMgr.XDEBUG_PREF_DATA));
acceptRemoteSession.select(prefs
.getInt(XDebugPreferenceMgr.XDEBUG_PREF_REMOTESESSION));
diff --git a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/model/DBGpTarget.java b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/model/DBGpTarget.java
index fe3c265..b66a581 100644
--- a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/model/DBGpTarget.java
+++ b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/model/DBGpTarget.java
@@ -1116,6 +1116,9 @@ public class DBGpTarget extends DBGpElement implements IPHPDebugTarget,
resp = session.sendSyncCmd(DBGpCommand.featureSet,
"-n max_children -v " + getMaxChildren()); //$NON-NLS-1$
DBGpUtils.isGoodDBGpResponse(this, resp);
+ resp = session.sendSyncCmd(DBGpCommand.featureSet,
+ "-n max_data -v " + getMaxData()); //$NON-NLS-1$
+ DBGpUtils.isGoodDBGpResponse(this, resp);
resp = session.sendSyncCmd(DBGpCommand.featureGet, "-n encoding"); //$NON-NLS-1$
if (DBGpUtils.isGoodDBGpResponse(this, resp)) {
Node child = resp.getParentNode().getFirstChild();
@@ -2277,6 +2280,15 @@ public class DBGpTarget extends DBGpElement implements IPHPDebugTarget,
}
return DBGpPreferences.DBGP_MAX_CHILDREN_DEFAULT;
}
+
+ public int getMaxData() {
+ if (sessionPreferences != null) {
+ return sessionPreferences.getInt(
+ DBGpPreferences.DBGP_MAX_DATA_PROPERTY,
+ DBGpPreferences.DBGP_MAX_DATA_DEFAULT);
+ }
+ return DBGpPreferences.DBGP_MAX_CHILDREN_DEFAULT;
+ }
private int getCaptureStdout() {
if (sessionPreferences != null) {