--java_debug doesn't work with "bazel run"?

152 views
Skip to first unread message

bend...@google.com

unread,
Jan 17, 2017, 11:41:13 AM1/17/17
to bazel-discuss
Hi everyone!

The "--java_debug" flag is printed when I run "bazel help run", but it doesn't seem to have any effect? Is this a bug or am I missing something?

Thanks,

Michal

Irina Iancu

unread,
Jan 18, 2017, 4:35:15 AM1/18/17
to bend...@google.com, bazel-discuss
Hi Michal,

"bazel help <command>" shows you first a description of the command and how to use it followed by all the options available in bazel, grouped by category. The "--java_debug" flag is printed under "Options that affect how bazel runs tests". You may want to check what is under "Options specific to 'bazel run'". However, for debugging purposes you may need the startup option --host_jvm_debug, which you can find described if you run 'bazel help startup_options'.
I understand your confusion since 'bazel help' prints all the options regardless of the command you gave as an argument, but this is happening because most of them are compatible with all commands or just a subset and it should be understood from the description/category title how they should be used.

Cheers,
Irina


--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/03b5371a-1446-4872-b353-c87dd9ee470e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Michal Bendowski

unread,
Jan 18, 2017, 5:06:13 AM1/18/17
to Irina Iancu, bazel-discuss
Thanks! It seems "bazel run :foo -- --debug" is the magic incantation I need.

On Wed, Jan 18, 2017 at 9:35 AM Irina Iancu <elena...@google.com> wrote:
Hi Michal,

"bazel help <command>" shows you first a description of the command and how to use it followed by all the options available in bazel, grouped by category. The "--java_debug" flag is printed under "Options that affect how bazel runs tests". You may want to check what is under "Options specific to 'bazel run'". However, for debugging purposes you may need the startup option --host_jvm_debug, which you can find described if you run 'bazel help startup_options'.
I understand your confusion since 'bazel help' prints all the options regardless of the command you gave as an argument, but this is happening because most of them are compatible with all commands or just a subset and it should be understood from the description/category title how they should be used.

Cheers,
Irina

On Tue, Jan 17, 2017 at 5:41 PM, bendowski via bazel-discuss <bazel-...@googlegroups.com> wrote:
Hi everyone!

The "--java_debug" flag is printed when I run "bazel help run", but it doesn't seem to have any effect? Is this a bug or am I missing something?

Thanks,

Michal

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages