1 .\" Copyright (c) 1995, 2022, Oracle and/or its affiliates. All rights reserved.
2 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 .\"
4 .\" This code is free software; you can redistribute it and/or modify it
5 .\" under the terms of the GNU General Public License version 2 only, as
6 .\" published by the Free Software Foundation.
7 .\"
8 .\" This code is distributed in the hope that it will be useful, but WITHOUT
9 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 .\" version 2 for more details (a copy is included in the LICENSE file that
12 .\" accompanied this code).
13 .\"
14 .\" You should have received a copy of the GNU General Public License version
15 .\" 2 along with this work; if not, write to the Free Software Foundation,
16 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 .\"
18 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19 .\" or visit www.oracle.com if you need additional information or have any
20 .\" questions.
21 .\"
198 initial application class is loaded.
199 At that point, you can set any necessary breakpoints and use the
200 \f[V]cont\f[R] command to continue execution.
201 .TP
202 \f[V]-listconnectors\f[R]
203 Lists the connectors available in this JVM.
204 .TP
205 \f[V]-connect\f[R] \f[I]connector-name\f[R]\f[V]:\f[R]\f[I]name1\f[R]\f[V]=\f[R]\f[I]value1\f[R]....
206 Connects to the target JVM with the named connector and listed argument
207 values.
208 .TP
209 \f[V]-dbgtrace\f[R] [\f[I]flags\f[R]]
210 Prints information for debugging the \f[V]jdb\f[R] command.
211 .TP
212 \f[V]-tclient\f[R]
213 Runs the application in the Java HotSpot VM client.
214 .TP
215 \f[V]-trackallthreads\f[R]
216 Track all threads as they are created, including virtual threads.
217 See \f[B]Working With Virtual Threads\f[R] below.
218 Virtual threads are a preview feature of the Java platform.
219 .TP
220 \f[V]-tserver\f[R]
221 Runs the application in the Java HotSpot VM server.
222 .TP
223 \f[V]-J\f[R]\f[I]option\f[R]
224 Passes \f[I]option\f[R] to the JDB JVM, where option is one of the
225 options described on the reference page for the Java application
226 launcher.
227 For example, \f[V]-J-Xms48m\f[R] sets the startup memory to 48 MB.
228 See \f[I]Overview of Java Options\f[R] in \f[B]java\f[R].
229 .PP
230 The following options are forwarded to the debuggee process:
231 .TP
232 \f[V]-R\f[R]\f[I]option\f[R]
233 Passes \f[I]option\f[R] to the debuggee JVM, where option is one of the
234 options described on the reference page for the Java application
235 launcher.
236 For example, \f[V]-R-Xms48m\f[R] sets the startup memory to 48 MB.
237 See \f[I]Overview of Java Options\f[R] in \f[B]java\f[R].
238 .TP
239 \f[V]-v\f[R] or \f[V]-verbose\f[R][\f[V]:\f[R]\f[I]class\f[R]|\f[V]gc\f[R]|\f[V]jni\f[R]]
240 Turns on the verbose mode.
241 .TP
242 \f[V]-D\f[R]\f[I]name\f[R]\f[V]=\f[R]\f[I]value\f[R]
243 Sets a system property.
244 .TP
245 \f[V]-classpath\f[R] \f[I]dir\f[R]
246 Lists directories separated by colons in which to look for classes.
247 .TP
248 \f[V]-X\f[R] \f[I]option\f[R]
249 A nonstandard target JVM option.
250 .PP
251 Other options are supported to provide alternate mechanisms for
252 connecting the debugger to the JVM that it\[aq]s to debug.
253 .SH WORKING WITH VIRTUAL THREADS
254 .PP
255 Virtual threads are a preview feature of the Java platform.
256 Preview features may be removed in a future release, or upgraded to
257 permanent features of the Java platform.
258 .PP
259 Often virtual theads are created in such large numbers and frequency
260 that they can overwhelm a debugger.
261 For this reason by default JDB does not keep track of virtual threads as
262 they are created.
263 It will only keep track of virtual threads that an event has arrived on,
264 such as a breakpoint event.
265 The \f[V]-trackallthreads\f[R] option can be used to make JDB track all
266 virtual threads as they are created.
267 .PP
268 When JDB first connects, it requests a list of all known threads from
269 the Debug Agent.
270 By default the debug agent does not return any virtual threads in this
271 list, once again because the list could be so large that it overwhelms
272 the debugger.
273 The Debug Agent has an \f[V]includevirtualthreads\f[R] option that can
274 be enabled to change this behavior so all known virtual threads will be
275 included in the list.
276 The JDB \f[V]-trackallthreads\f[R] option will cause JDB to
277 automatically enable the Debug Agent\[aq]s
278 \f[V]includevirtualthreads\f[R] option when JDB launches an application
|
1 .\" Copyright (c) 1995, 2023, Oracle and/or its affiliates. All rights reserved.
2 .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 .\"
4 .\" This code is free software; you can redistribute it and/or modify it
5 .\" under the terms of the GNU General Public License version 2 only, as
6 .\" published by the Free Software Foundation.
7 .\"
8 .\" This code is distributed in the hope that it will be useful, but WITHOUT
9 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 .\" version 2 for more details (a copy is included in the LICENSE file that
12 .\" accompanied this code).
13 .\"
14 .\" You should have received a copy of the GNU General Public License version
15 .\" 2 along with this work; if not, write to the Free Software Foundation,
16 .\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 .\"
18 .\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19 .\" or visit www.oracle.com if you need additional information or have any
20 .\" questions.
21 .\"
198 initial application class is loaded.
199 At that point, you can set any necessary breakpoints and use the
200 \f[V]cont\f[R] command to continue execution.
201 .TP
202 \f[V]-listconnectors\f[R]
203 Lists the connectors available in this JVM.
204 .TP
205 \f[V]-connect\f[R] \f[I]connector-name\f[R]\f[V]:\f[R]\f[I]name1\f[R]\f[V]=\f[R]\f[I]value1\f[R]....
206 Connects to the target JVM with the named connector and listed argument
207 values.
208 .TP
209 \f[V]-dbgtrace\f[R] [\f[I]flags\f[R]]
210 Prints information for debugging the \f[V]jdb\f[R] command.
211 .TP
212 \f[V]-tclient\f[R]
213 Runs the application in the Java HotSpot VM client.
214 .TP
215 \f[V]-trackallthreads\f[R]
216 Track all threads as they are created, including virtual threads.
217 See \f[B]Working With Virtual Threads\f[R] below.
218 .TP
219 \f[V]-tserver\f[R]
220 Runs the application in the Java HotSpot VM server.
221 .TP
222 \f[V]-J\f[R]\f[I]option\f[R]
223 Passes \f[I]option\f[R] to the JDB JVM, where option is one of the
224 options described on the reference page for the Java application
225 launcher.
226 For example, \f[V]-J-Xms48m\f[R] sets the startup memory to 48 MB.
227 See \f[I]Overview of Java Options\f[R] in \f[B]java\f[R].
228 .PP
229 The following options are forwarded to the debuggee process:
230 .TP
231 \f[V]-R\f[R]\f[I]option\f[R]
232 Passes \f[I]option\f[R] to the debuggee JVM, where option is one of the
233 options described on the reference page for the Java application
234 launcher.
235 For example, \f[V]-R-Xms48m\f[R] sets the startup memory to 48 MB.
236 See \f[I]Overview of Java Options\f[R] in \f[B]java\f[R].
237 .TP
238 \f[V]-v\f[R] or \f[V]-verbose\f[R][\f[V]:\f[R]\f[I]class\f[R]|\f[V]gc\f[R]|\f[V]jni\f[R]]
239 Turns on the verbose mode.
240 .TP
241 \f[V]-D\f[R]\f[I]name\f[R]\f[V]=\f[R]\f[I]value\f[R]
242 Sets a system property.
243 .TP
244 \f[V]-classpath\f[R] \f[I]dir\f[R]
245 Lists directories separated by colons in which to look for classes.
246 .TP
247 \f[V]-X\f[R] \f[I]option\f[R]
248 A nonstandard target JVM option.
249 .PP
250 Other options are supported to provide alternate mechanisms for
251 connecting the debugger to the JVM that it\[aq]s to debug.
252 .SH WORKING WITH VIRTUAL THREADS
253 .PP
254 Often virtual theads are created in such large numbers and frequency
255 that they can overwhelm a debugger.
256 For this reason by default JDB does not keep track of virtual threads as
257 they are created.
258 It will only keep track of virtual threads that an event has arrived on,
259 such as a breakpoint event.
260 The \f[V]-trackallthreads\f[R] option can be used to make JDB track all
261 virtual threads as they are created.
262 .PP
263 When JDB first connects, it requests a list of all known threads from
264 the Debug Agent.
265 By default the debug agent does not return any virtual threads in this
266 list, once again because the list could be so large that it overwhelms
267 the debugger.
268 The Debug Agent has an \f[V]includevirtualthreads\f[R] option that can
269 be enabled to change this behavior so all known virtual threads will be
270 included in the list.
271 The JDB \f[V]-trackallthreads\f[R] option will cause JDB to
272 automatically enable the Debug Agent\[aq]s
273 \f[V]includevirtualthreads\f[R] option when JDB launches an application
|