Skip to content

Commit 34f7376

Browse files
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
1 parent a3377e0 commit 34f7376

File tree

2 files changed

+109
-1
lines changed

2 files changed

+109
-1
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ Please also check the documentation of [Language Support for Java by Red Hat](ht
6161
- `internalConsole` - VS Code debug console (input stream not supported).
6262
- `integratedTerminal` - VS Code integrated terminal.
6363
- `externalTerminal` - External terminal that can be configured in user settings.
64+
- `stepFilters` - Skip specified classes or methods when stepping.
65+
- `classNameFilters` - Skip the specified classes when stepping. Class names should be fully qualified. Wildcard is supported.
66+
- `skipSynthetics` - Skip synthetic methods when stepping.
67+
- `skipStaticInitializers` - Skip static initializer methods when stepping.
68+
- `skipConstructors` - Skip constructor methods when stepping.
6469

6570
### Attach
6671

@@ -69,6 +74,11 @@ Please also check the documentation of [Language Support for Java by Red Hat](ht
6974
- `timeout` - Timeout value before reconnecting, in milliseconds (default to 30000ms).
7075
- `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.
7176
- `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.
77+
- `stepFilters` - Skip specified classes or methods when stepping.
78+
- `classNameFilters` - Skip the specified classes when stepping. Class names should be fully qualified. Wildcard is supported.
79+
- `skipSynthetics` - Skip synthetic methods when stepping.
80+
- `skipStaticInitializers` - Skip static initializer methods when stepping.
81+
- `skipConstructors` - Skip constructor methods when stepping.
7282

7383
### User Settings
7484

package.json

Lines changed: 99 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,55 @@
131131
],
132132
"description": "The specified console to launch the program.",
133133
"default": "internalConsole"
134+
},
135+
"stepFilters": {
136+
"type": "object",
137+
"description": "Skip specified classes or methods when stepping.",
138+
"default": {
139+
"classNameFilters": [
140+
"java.*",
141+
"javax.*",
142+
"com.sun.*",
143+
"sun.*",
144+
"sunw.*",
145+
"org.omg.*"
146+
],
147+
"skipSynthetics": false,
148+
"skipStaticInitializers": false,
149+
"skipConstructors": false
150+
},
151+
"properties": {
152+
"classNameFilters": {
153+
"type": "array",
154+
"description": "Skip the specified classes when stepping. Class names should be fully qualified. Wildcard is supported.",
155+
"item": {
156+
"type": "string"
157+
},
158+
"default": [
159+
"java.*",
160+
"javax.*",
161+
"com.sun.*",
162+
"sun.*",
163+
"sunw.*",
164+
"org.omg.*"
165+
]
166+
},
167+
"skipSynthetics": {
168+
"type": "boolean",
169+
"description": "Skip synthetic methods when stepping.",
170+
"default": true
171+
},
172+
"skipStaticInitializers": {
173+
"type": "boolean",
174+
"description": "Skip static initializer methods when stepping.",
175+
"default": true
176+
},
177+
"skipConstructors": {
178+
"type": "boolean",
179+
"description": "Skip constructor methods when stepping.",
180+
"default": true
181+
}
182+
}
134183
}
135184
}
136185
},
@@ -166,6 +215,55 @@
166215
"type": "string",
167216
"description": "The preferred project in which the debugger searches for classes. There could be duplicated class names in different projects.",
168217
"default": ""
218+
},
219+
"stepFilters": {
220+
"type": "object",
221+
"description": "Skip specified classes or methods when stepping.",
222+
"default": {
223+
"classNameFilters": [
224+
"java.*",
225+
"javax.*",
226+
"com.sun.*",
227+
"sun.*",
228+
"sunw.*",
229+
"org.omg.*"
230+
],
231+
"skipSynthetics": false,
232+
"skipStaticInitializers": false,
233+
"skipConstructors": false
234+
},
235+
"properties": {
236+
"classNameFilters": {
237+
"type": "array",
238+
"description": "Skip the specified classes when stepping. Class names should be fully qualified. Wildcard is supported.",
239+
"item": {
240+
"type": "string"
241+
},
242+
"default": [
243+
"java.*",
244+
"javax.*",
245+
"com.sun.*",
246+
"sun.*",
247+
"sunw.*",
248+
"org.omg.*"
249+
]
250+
},
251+
"skipSynthetics": {
252+
"type": "boolean",
253+
"description": "Skip synthetic methods when stepping.",
254+
"default": false
255+
},
256+
"skipStaticInitializers": {
257+
"type": "boolean",
258+
"description": "Skip static initializer methods when stepping.",
259+
"default": false
260+
},
261+
"skipConstructors": {
262+
"type": "boolean",
263+
"description": "Skip constructor methods when stepping.",
264+
"default": false
265+
}
266+
}
169267
}
170268
}
171269
}
@@ -216,7 +314,7 @@
216314
},
217315
"java.debug.settings.showHex": {
218316
"type": "boolean",
219-
"description" : "show numbers in hex format in \"Variables\" viewlet.",
317+
"description": "show numbers in hex format in \"Variables\" viewlet.",
220318
"default": false
221319
},
222320
"java.debug.settings.showStaticVariables": {

0 commit comments

Comments
 (0)