Support step filter when stepping (#155)

* Support step filter when debugging

Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>

* Refine the description message per review comments

Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>

* refine message for attach mode

Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>

* Rename debugFilters/stepFilters to stepFilters/classNameFilters

* Resolve review comments
This commit is contained in:
Jinbo Wang 2017-12-06 18:40:23 +08:00 committed by GitHub
parent a3377e04ab
commit 34f7376a65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 109 additions and 1 deletions

View File

@ -61,6 +61,11 @@ Please also check the documentation of [Language Support for Java by Red Hat](ht
- `internalConsole` - VS Code debug console (input stream not supported).
- `integratedTerminal` - VS Code integrated terminal.
- `externalTerminal` - External terminal that can be configured in user settings.
- `stepFilters` - Skip specified classes or methods when stepping.
- `classNameFilters` - Skip the specified classes when stepping. Class names should be fully qualified. Wildcard is supported.
- `skipSynthetics` - Skip synthetic methods when stepping.
- `skipStaticInitializers` - Skip static initializer methods when stepping.
- `skipConstructors` - Skip constructor methods when stepping.
### Attach
@ -69,6 +74,11 @@ Please also check the documentation of [Language Support for Java by Red Hat](ht
- `timeout` - Timeout value before reconnecting, in milliseconds (default to 30000ms).
- `sourcePaths` - The extra source directories of the program. The debugger looks for source code from project settings by default. This option allows the debugger to look for source code in extra directories.
- `projectName` - The preferred project in which the debugger searches for classes. There could be duplicated class names in different projects. This setting also works when the debugger looks for the specified main class when launching a program.
- `stepFilters` - Skip specified classes or methods when stepping.
- `classNameFilters` - Skip the specified classes when stepping. Class names should be fully qualified. Wildcard is supported.
- `skipSynthetics` - Skip synthetic methods when stepping.
- `skipStaticInitializers` - Skip static initializer methods when stepping.
- `skipConstructors` - Skip constructor methods when stepping.
### User Settings

View File

@ -131,6 +131,55 @@
],
"description": "The specified console to launch the program.",
"default": "internalConsole"
},
"stepFilters": {
"type": "object",
"description": "Skip specified classes or methods when stepping.",
"default": {
"classNameFilters": [
"java.*",
"javax.*",
"com.sun.*",
"sun.*",
"sunw.*",
"org.omg.*"
],
"skipSynthetics": false,
"skipStaticInitializers": false,
"skipConstructors": false
},
"properties": {
"classNameFilters": {
"type": "array",
"description": "Skip the specified classes when stepping. Class names should be fully qualified. Wildcard is supported.",
"item": {
"type": "string"
},
"default": [
"java.*",
"javax.*",
"com.sun.*",
"sun.*",
"sunw.*",
"org.omg.*"
]
},
"skipSynthetics": {
"type": "boolean",
"description": "Skip synthetic methods when stepping.",
"default": true
},
"skipStaticInitializers": {
"type": "boolean",
"description": "Skip static initializer methods when stepping.",
"default": true
},
"skipConstructors": {
"type": "boolean",
"description": "Skip constructor methods when stepping.",
"default": true
}
}
}
}
},
@ -166,6 +215,55 @@
"type": "string",
"description": "The preferred project in which the debugger searches for classes. There could be duplicated class names in different projects.",
"default": ""
},
"stepFilters": {
"type": "object",
"description": "Skip specified classes or methods when stepping.",
"default": {
"classNameFilters": [
"java.*",
"javax.*",
"com.sun.*",
"sun.*",
"sunw.*",
"org.omg.*"
],
"skipSynthetics": false,
"skipStaticInitializers": false,
"skipConstructors": false
},
"properties": {
"classNameFilters": {
"type": "array",
"description": "Skip the specified classes when stepping. Class names should be fully qualified. Wildcard is supported.",
"item": {
"type": "string"
},
"default": [
"java.*",
"javax.*",
"com.sun.*",
"sun.*",
"sunw.*",
"org.omg.*"
]
},
"skipSynthetics": {
"type": "boolean",
"description": "Skip synthetic methods when stepping.",
"default": false
},
"skipStaticInitializers": {
"type": "boolean",
"description": "Skip static initializer methods when stepping.",
"default": false
},
"skipConstructors": {
"type": "boolean",
"description": "Skip constructor methods when stepping.",
"default": false
}
}
}
}
}
@ -216,7 +314,7 @@
},
"java.debug.settings.showHex": {
"type": "boolean",
"description" : "show numbers in hex format in \"Variables\" viewlet.",
"description": "show numbers in hex format in \"Variables\" viewlet.",
"default": false
},
"java.debug.settings.showStaticVariables": {