From 2ec2a4016f3d1d62ed4196c1b6ade727d55d22a3 Mon Sep 17 00:00:00 2001 From: Jinbo Wang Date: Mon, 10 Aug 2020 17:59:00 +0800 Subject: [PATCH 1/2] Add a settings to control the max variable numbers in one JDWP request --- README.md | 1 + package.json | 5 +++++ package.nls.json | 3 ++- package.nls.zh.json | 3 ++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cc80d174..9d5b83ff 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,7 @@ Please also check the documentation of [Language Support for Java by Red Hat](ht - `java.debug.settings.stepping.skipSynthetics`: Skip synthetic methods when stepping. - `java.debug.settings.stepping.skipStaticInitializers`: Skip static initializer methods when stepping. - `java.debug.settings.stepping.skipConstructors`: Skip constructor methods when stepping. +- `java.debug.settings.limitOfVariablesPerJdwpRequest`: The maximum number of variables or fields that can be requested in one JDWP request. The higher the value, the less frequently debuggee will be requested when expanding the variable view. Defaults to 100. Pro Tip: The documentation [Configuration.md](https://github.com/microsoft/vscode-java-debug/blob/master/Configuration.md) provides lots of samples to demonstrate how to use these debug configurations, recommend to take a look. diff --git a/package.json b/package.json index 90a44597..1b8750af 100644 --- a/package.json +++ b/package.json @@ -685,6 +685,11 @@ "type": "boolean", "description": "%java.debugger.launch.skipConstructors.description%", "default": false + }, + "java.debug.settings.limitOfVariablesPerJdwpRequest": { + "type": "number", + "description": "%java.debugger.configuration.limitOfVariablesPerJdwpRequest.description%", + "default": 100 } } } diff --git a/package.nls.json b/package.nls.json index fa341a5e..d334ff09 100644 --- a/package.nls.json +++ b/package.nls.json @@ -54,5 +54,6 @@ "java.debugger.configuration.enableRunDebugCodeLens.description": "Enable the run and debug code lens providers over main methods.", "java.debugger.configuration.forceBuildBeforeLaunch": "Force building the workspace before launching java program.", "java.debugger.configuration.console": "The specified console to launch Java program. If you want to customize the console for a specific debug session, please modify the 'console' config in launch.json.", - "java.debugger.configuration.exceptionBreakpoint.skipClasses": "Skip the specified classes when breaking on exception. You could use the built-in variables such as '$JDK' and '$Libraries' to skip a group of classes, or add a specific class name expression, e.g. java.*, *.Foo" + "java.debugger.configuration.exceptionBreakpoint.skipClasses": "Skip the specified classes when breaking on exception. You could use the built-in variables such as '$JDK' and '$Libraries' to skip a group of classes, or add a specific class name expression, e.g. java.*, *.Foo", + "java.debugger.configuration.limitOfVariablesPerJdwpRequest.description": "The maximum number of variables or fields that can be requested in one JDWP request. The higher the value, the less frequently debuggee will be requested when expanding the variable view." } diff --git a/package.nls.zh.json b/package.nls.zh.json index 6d915732..e3333835 100644 --- a/package.nls.zh.json +++ b/package.nls.zh.json @@ -53,5 +53,6 @@ "java.debugger.configuration.enableRunDebugCodeLens.description": "在main方法上启用CodeLens标记。", "java.debugger.configuration.forceBuildBeforeLaunch": "在启动java程序之前强制编译整个工作空间。", "java.debugger.configuration.console": "指定的控制台用于启动Java程序。如果要为特定的调试会话自定义控制台,请修改launch.json中的“console”配置。", - "java.debugger.configuration.exceptionBreakpoint.skipClasses": "当发生异常时,跳过指定的类。你可以使用内置变量,如'$JDK'和'$Libraries'来跳过一组类,或者添加一个特定的类名表达式,如java.*,*.Foo。" + "java.debugger.configuration.exceptionBreakpoint.skipClasses": "当发生异常时,跳过指定的类。你可以使用内置变量,如'$JDK'和'$Libraries'来跳过一组类,或者添加一个特定的类名表达式,如java.*,*.Foo。", + "java.debugger.configuration.limitOfVariablesPerJdwpRequest.description": "一次JDWP请求中可以请求的变量或字段的最大数量。该值越高,在展开变量视图时,请求debuggee的频率就越低。" } \ No newline at end of file From 69282d74b1c9e1e365abfc4e5718ffdcd3f9cdfc Mon Sep 17 00:00:00 2001 From: Jinbo Wang Date: Tue, 11 Aug 2020 13:18:13 +0800 Subject: [PATCH 2/2] Refactor the setting description --- README.md | 2 +- package.nls.json | 2 +- package.nls.zh.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9d5b83ff..c00c2af5 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ Please also check the documentation of [Language Support for Java by Red Hat](ht - `java.debug.settings.stepping.skipSynthetics`: Skip synthetic methods when stepping. - `java.debug.settings.stepping.skipStaticInitializers`: Skip static initializer methods when stepping. - `java.debug.settings.stepping.skipConstructors`: Skip constructor methods when stepping. -- `java.debug.settings.limitOfVariablesPerJdwpRequest`: The maximum number of variables or fields that can be requested in one JDWP request. The higher the value, the less frequently debuggee will be requested when expanding the variable view. Defaults to 100. +- `java.debug.settings.limitOfVariablesPerJdwpRequest`: The maximum number of variables or fields that can be requested in one JDWP request. The higher the value, the less frequently debuggee will be requested when expanding the variable view. Also a large number can cause JDWP request timeout. Defaults to 100. Pro Tip: The documentation [Configuration.md](https://github.com/microsoft/vscode-java-debug/blob/master/Configuration.md) provides lots of samples to demonstrate how to use these debug configurations, recommend to take a look. diff --git a/package.nls.json b/package.nls.json index d334ff09..df7b3a09 100644 --- a/package.nls.json +++ b/package.nls.json @@ -55,5 +55,5 @@ "java.debugger.configuration.forceBuildBeforeLaunch": "Force building the workspace before launching java program.", "java.debugger.configuration.console": "The specified console to launch Java program. If you want to customize the console for a specific debug session, please modify the 'console' config in launch.json.", "java.debugger.configuration.exceptionBreakpoint.skipClasses": "Skip the specified classes when breaking on exception. You could use the built-in variables such as '$JDK' and '$Libraries' to skip a group of classes, or add a specific class name expression, e.g. java.*, *.Foo", - "java.debugger.configuration.limitOfVariablesPerJdwpRequest.description": "The maximum number of variables or fields that can be requested in one JDWP request. The higher the value, the less frequently debuggee will be requested when expanding the variable view." + "java.debugger.configuration.limitOfVariablesPerJdwpRequest.description": "The maximum number of variables or fields that can be requested in one JDWP request. The higher the value, the less frequently debuggee will be requested when expanding the variable view. Also a large number can cause JDWP request timeout." } diff --git a/package.nls.zh.json b/package.nls.zh.json index e3333835..7e81c911 100644 --- a/package.nls.zh.json +++ b/package.nls.zh.json @@ -54,5 +54,5 @@ "java.debugger.configuration.forceBuildBeforeLaunch": "在启动java程序之前强制编译整个工作空间。", "java.debugger.configuration.console": "指定的控制台用于启动Java程序。如果要为特定的调试会话自定义控制台,请修改launch.json中的“console”配置。", "java.debugger.configuration.exceptionBreakpoint.skipClasses": "当发生异常时,跳过指定的类。你可以使用内置变量,如'$JDK'和'$Libraries'来跳过一组类,或者添加一个特定的类名表达式,如java.*,*.Foo。", - "java.debugger.configuration.limitOfVariablesPerJdwpRequest.description": "一次JDWP请求中可以请求的变量或字段的最大数量。该值越高,在展开变量视图时,请求debuggee的频率就越低。" + "java.debugger.configuration.limitOfVariablesPerJdwpRequest.description": "一次JDWP请求中可以请求的变量或字段的最大数量。该值越高,在展开变量视图时,请求debuggee的频率就越低。同时数量过大也会导致JDWP请求超时。" } \ No newline at end of file