Skip to content

Commit adbc59d

Browse files
Added debugger user setting for setting numeric precision (#313)
Co-authored-by: Jinbo Wang <[email protected]>
1 parent e81f9c1 commit adbc59d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/DebugSettings.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public final class DebugSettings {
2222
private static DebugSettings current = new DebugSettings();
2323

2424
public int maxStringLength = 0;
25+
public int numericPrecision = 0;
2526
public boolean showStaticVariables = false;
2627
public boolean showQualifiedNames = false;
2728
public boolean showHex = false;

com.microsoft.java.debug.core/src/main/java/com/microsoft/java/debug/core/adapter/variables/VariableUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,10 @@ public static void applyFormatterOptions(Map<String, Object> defaultOptions, boo
248248
if (DebugSettings.getCurrent().maxStringLength > 0) {
249249
options.put(StringObjectFormatter.MAX_STRING_LENGTH_OPTION, DebugSettings.getCurrent().maxStringLength);
250250
}
251+
252+
if (DebugSettings.getCurrent().numericPrecision > 0) {
253+
options.put(NumericFormatter.NUMERIC_PRECISION_OPTION, DebugSettings.getCurrent().numericPrecision);
254+
}
251255
}
252256

253257
private VariableUtils() {

0 commit comments

Comments
 (0)