Skip to content

Conversation

tca3
Copy link

@tca3 tca3 commented Aug 25, 2022

Fixes #101

case class DebugSettings(port: Int = 5005, suspend: Boolean = false) {
def toCmdLineArg: String =
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=%s,address=%d".format(b2str(suspend), port)
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=%s,address=*:%d".format(b2str(suspend), port)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, would this open the port on 0.0.0.0?

If you'd do that on your host system, it'd mean the port would be open for anyone who can connect to it. I expect the debugging interface allows arbitrary code execution, so perhaps this should be an opt-in option instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I've updated the code to have it as an optional parameter

Copy link
Contributor

@raboof raboof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds reasonable to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable debugging for any address

2 participants