From 6768a83232d00ef10a175d5cca8ade1b3821b69d Mon Sep 17 00:00:00 2001 From: Clinton Alexander Date: Tue, 4 Apr 2017 10:28:18 +0100 Subject: [PATCH] Readded the debug port to the driver and added a log entry for the debug port. --- node/src/main/kotlin/net/corda/node/Corda.kt | 4 ++++ node/src/main/kotlin/net/corda/node/driver/Driver.kt | 1 + 2 files changed, 5 insertions(+) diff --git a/node/src/main/kotlin/net/corda/node/Corda.kt b/node/src/main/kotlin/net/corda/node/Corda.kt index 93410454f6..49eb9fa647 100644 --- a/node/src/main/kotlin/net/corda/node/Corda.kt +++ b/node/src/main/kotlin/net/corda/node/Corda.kt @@ -118,6 +118,10 @@ fun main(args: Array) { log.info("VM ${info.vmName} ${info.vmVendor} ${info.vmVersion}") log.info("Machine: ${InetAddress.getLocalHost().hostName}") log.info("Working Directory: ${cmdlineOptions.baseDirectory}") + val agentProperties = sun.misc.VMSupport.getAgentProperties() + if(agentProperties.containsKey("sun.jdwp.listenerAddress")) { + log.info("Debug port: ${agentProperties.getProperty("sun.jdwp.listenerAddress")}") + } log.info("Starting as node on ${conf.p2pAddress}") try { diff --git a/node/src/main/kotlin/net/corda/node/driver/Driver.kt b/node/src/main/kotlin/net/corda/node/driver/Driver.kt index b7e0857620..1ff1fc686e 100644 --- a/node/src/main/kotlin/net/corda/node/driver/Driver.kt +++ b/node/src/main/kotlin/net/corda/node/driver/Driver.kt @@ -576,6 +576,7 @@ class DriverDSL( "--logging-level=$loggingLevel", "--no-local-shell" ), + jdwpPort = debugPort, extraJvmArguments = extraJvmArguments, errorLogPath = nodeConf.baseDirectory / LOGS_DIRECTORY_NAME / "error.log", workingDirectory = nodeConf.baseDirectory