mirror of
https://github.com/corda/corda.git
synced 2025-02-21 09:51:57 +00:00
Fixed driver debug mode.
This commit is contained in:
parent
2680687dcb
commit
82b416cb88
@ -457,14 +457,16 @@ class DriverDSL(
|
|||||||
val separator = System.getProperty("file.separator")
|
val separator = System.getProperty("file.separator")
|
||||||
val classpath = System.getProperty("java.class.path")
|
val classpath = System.getProperty("java.class.path")
|
||||||
val path = System.getProperty("java.home") + separator + "bin" + separator + "java"
|
val path = System.getProperty("java.home") + separator + "bin" + separator + "java"
|
||||||
|
|
||||||
|
val debugPortArg: String = if(debugPort != null)
|
||||||
|
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=$debugPort"
|
||||||
|
else
|
||||||
|
""
|
||||||
|
|
||||||
val javaArgs = listOf(path) +
|
val javaArgs = listOf(path) +
|
||||||
listOf("-Dname=$legalName", "-javaagent:$quasarJarPath",
|
listOf("-Dname=$legalName", "-javaagent:$quasarJarPath", debugPortArg,
|
||||||
"-cp", classpath, className) +
|
"-cp", classpath, className) +
|
||||||
cliParams.toCliArguments() +
|
cliParams.toCliArguments()
|
||||||
if (debugPort != null)
|
|
||||||
listOf("-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=$debugPort")
|
|
||||||
else
|
|
||||||
listOf()
|
|
||||||
val builder = ProcessBuilder(javaArgs)
|
val builder = ProcessBuilder(javaArgs)
|
||||||
builder.redirectError(Paths.get("error.$className.log").toFile())
|
builder.redirectError(Paths.get("error.$className.log").toFile())
|
||||||
builder.inheritIO()
|
builder.inheritIO()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user