Thanks Koen!!.

On Monday, November 16, 2015 at 2:36:44 AM UTC-6, Koen Roevens wrote:
>
> Hi Manny,
>
> I think you're a bit confused.
>
> java -jar .. does not open a debug socket by default. It only does it if 
> you instruct it to do so.
>
> If you start the application in debug mode within your IDE, then your IDE 
> will start the application with a command similar to:
> "C:\Program Files\Java\jdk1.8.0_65\bin\java" 
> -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:61413,suspend=y,server=n 
> -Dfile.encoding=UTF-8 -classpath ....
>
> What I do to ease debugging in the IDE, is to write a main method similar 
> to:
> ...
>     public static void main(String[] args) throws Exception {
>       if (args != null && args.length > 0) {
>          new HelloApplication().run(args);
>       } else {
>         new HelloApplication().run("server", 
> "./src/main/config/hello-config.yml");
>     }
> ...
>  
> The else clause is used when debugging in the IDE.
>
> - Koen
>
>
> On Sunday, November 15, 2015 at 6:42:10 PM UTC+1, Manny Rodriguez wrote:
>>
>> Thanks James + Nasir,
>>
>> Then that concerns me! That tells me that Dropwizard runs JPDA by 
>> default, which is a *major* security hole as well as a *major* performance 
>> loss. Can someone explain to me how this is possible?
>>
>> Outside of Dropwizard, say, with Tomcat, one always needs to set the JVM 
>> process up to run JPDA. Then you need to run it (with JPDA), and then run 
>> your Debug Configuration inside Eclipse (which acts as the JPDA client).
>>
>>
>> *If Dropwizard does this by default then how do you turn it off (for 
>> production use cases)?!?!*
>>
>>
>> Thanks!
>>
>> On Sunday, November 15, 2015 at 9:00:31 AM UTC-5, James Milligan wrote:
>>>
>>> I use Eclipse too, and it's just like Nasir said - pop your arguments in 
>>> a debug configuration, and away you go. I didn't need to add anything to my 
>>> config file to make this work.
>>>
>>> On Sunday, 15 November 2015 11:15:52 UTC, Manny Rodriguez wrote:
>>>>
>>>> Thanks Nasir,
>>>>
>>>> What does your "config.ml" (config.yml?) look like? I imagine the 
>>>> JPDA/debug settings are somewhere inside that file...
>>>>
>>>>
>>>> On Sunday, November 15, 2015 at 6:09:44 AM UTC-5, Nasir Rasul wrote:
>>>>>
>>>>> Hi Manny,
>>>>> In intellij, I create an Application configuration, specify the main 
>>>>> class, and provide the arguments "server config.ml".
>>>>>
>>>>> This is sufficient to enable debug functionality. 
>>>>>
>>>>> I imagine, it would be similar in eclipse.
>>>>>
>>>>> - Nasir
>>>>>
>>>>> On Sun, Nov 15, 2015 at 1:51 AM, Manny Rodriguez <[email protected]
>>>>> > wrote:
>>>>>
>>>>>> I'm looking to run my Dropwizard 0.8.5 app in *debug mode* whereby:
>>>>>>
>>>>>> * The app is running locally, using JPDA; and
>>>>>> * In my IDE (Eclipse) I set breakpoints and use a JPDA client to 
>>>>>> connect to my locally running app (I think this is how it goes)
>>>>>>
>>>>>> ---
>>>>>>
>>>>>> *For the server debug mode:*
>>>>>>
>>>>>> Typically my DW app runs from the command-line like so:
>>>>>>
>>>>>>     java -jar build/libs/myapp.jar server 
>>>>>> src/test/resources/myapp-local.yml
>>>>>>
>>>>>> So what are the command-line args to get this running in debug mode 
>>>>>> (JPDA), or what are the modifications to `myapp-local.yml` needed to 
>>>>>> accomplish this?
>>>>>>
>>>>>> ---
>>>>>>
>>>>>> *For Eclipse/JPDA Client:*
>>>>>>
>>>>>> I assume I just set breakpoints and then create a new **Debug 
>>>>>> Configuration** inside Eclipse, but not sure what arguments/configs to 
>>>>>> set 
>>>>>> this Configuration up with. Any ideas here?
>>>>>>
>>>>>> -- 
>>>>>> You received this message because you are subscribed to the Google 
>>>>>> Groups "dropwizard-user" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>> send an email to [email protected].
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to