You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2012/06/22 12:35:42 UTC
[jira] [Commented] (DERBY-5819) Add logic to BaseTestCase to start
subprocesses ready to be attached to from a Java debugger
[ https://issues.apache.org/jira/browse/DERBY-5819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13399252#comment-13399252 ]
Knut Anders Hatlen commented on DERBY-5819:
-------------------------------------------
This sounds like useful functionality. A couple of comments:
- Maybe the properties should be prefixed with "derby.test." for consistency with the other test properties.
- Won't this check fail with a NullPointerException if the debugSubprocesses property is not set?
+ if (isSunJVM() && "true".equals(
+ getSystemProperty("debugSubprocesses").toLowerCase())) {
(Btw, Boolean.valueOf(String) would save you the trouble of normalizing/lowercasing the value, and it also handles null.)
> Add logic to BaseTestCase to start subprocesses ready to be attached to from a Java debugger
> --------------------------------------------------------------------------------------------
>
> Key: DERBY-5819
> URL: https://issues.apache.org/jira/browse/DERBY-5819
> Project: Derby
> Issue Type: Improvement
> Components: Test
> Reporter: Dag H. Wanvik
> Assignee: Dag H. Wanvik
> Priority: Minor
> Attachments: derby-5819.diff, derby-5819b.diff
>
>
> Sometimes it's useful to be able to attach to subprocesses of tests with a debugger.
> Now that we have centralized subprocess creation in BaseTestCase#execJavaCmd it would be easy and useful to have subprocesses start, but wait for a debugger to attach to them, i.e. with these options on an Oracle VM:
> -Xdebug -Xrunjdwp:transport=dt_socket,address=<port>,server=y,suspend=y
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira