Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote debugging on random port needed when running multiple applications #248

Closed
undergraver opened this issue Apr 23, 2020 · 8 comments · Fixed by #252
Closed

remote debugging on random port needed when running multiple applications #248

undergraver opened this issue Apr 23, 2020 · 8 comments · Fixed by #252

Comments

@undergraver
Copy link
Contributor

undergraver commented Apr 23, 2020

Currently, for remote debugging, the option offered by OWS is to specify a port as the message says:

"Applications will be started with '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005'.
Only one application can be started in parallel while debugging is active!"

Our solution for this was not to specify any port, so the command would look something like this:

"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n" (that is without address parameter)

You don't have to worry about the port used as this can be easily found out with tools like process explorer under windows quite easily.

This allows developers to debug multiple applications at the same time without having the issue that once an application starts under a defined port others cannot be started in debug mode anymore.

Can you please include this option when, for example, leaving the field empty?

@undergraver
Copy link
Contributor Author

Also, can you please also offer the option to configure suspend? We want to have the option suspend=y in order to debug the startup of the application.

@hendrikebbers
Copy link
Contributor

Hi undergraver. I can understand your idea. Maybe you can do a PR for this new feature. I assume that we currently do not have time to work on it.

@undergraver
Copy link
Contributor Author

Hi @hendrikebbers ,

Sure. Just let me know where that part of code is because I was thinking exactly the same. I have quite some experience with remote debugging in java under some weird conditions that I believe will help solve many of the debugging requests in the future, including ours.

@hendrikebbers
Copy link
Contributor

Cool :)

The settings dialog can be found here: com.openwebstart.debug.DebugPanel
The app starter (that uses the settings) can be found here: com.openwebstart.launcher.OwsJvmLauncher

You can check where com.openwebstart.config.OwsDefaultsProvider.REMOTE_DEBUG_PORT is used to find the correct code blocks.

@undergraver
Copy link
Contributor Author

undergraver commented Apr 29, 2020

Hi @hendrikebbers ,

I've completed the main work on the configuration.
Two questions: how can I test this, currently? I only did the UI part - which works ok. But OpenWebStart from the system is still used. How can I make use of the openwebstart compiled by me?

Am am I supposed to translate (German and French) the newly added texts items?

@undergraver
Copy link
Contributor Author

Hi,

I created pull request #252 for this. Please have a look and let me know if it needs some corrections.

Thanks,
Iulian

sclassen added a commit that referenced this issue May 2, 2020
#248 remote debugging; configurable suspend option and random port option
@sclassen
Copy link
Member

sclassen commented May 2, 2020

Thank you for your contribution.
We will change the default for "suspended" to true in order to keep the current behavior.

@undergraver
Copy link
Contributor Author

Thanks for the cleanup.

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 a pull request may close this issue.

3 participants