Shut down a debug session

I noticed that when you 'run' a project there is a button to 'Exit' the
application vs 'Stop' it. This is nice because it causes anything with
shutdown hooks to be run. Is there anything similar while debugging?

Thanks

-Pete

6 comments

If you are debugging an AppServer, its shutdown script will be executed.
And if the debuggee is an ordinary application, just close it.

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

I have a console application so I can't 'close' it. Exiting the debugger
does not execute the shutdown hooks I have created. Any ideas (no pun
intended).

-Pete

On Wed, 01 Mar 2006 09:53:39 -0800, Eugene Zhuravlev (JetBrains)
<jeka@intellij.com> wrote:

If you are debugging an AppServer, its shutdown script will be executed.
And if the debuggee is an ordinary application, just close it.

>

0

How would you close the application if it were started from the command line?

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

<javaman@cox.net> wrote in message news:op.s5svpqkwi6m5li@epcxp-haidinyak.hightowersoftware.net...
I have a console application so I can't 'close' it. Exiting the debugger
does not execute the shutdown hooks I have created. Any ideas (no pun
intended).

-Pete

On Wed, 01 Mar 2006 09:53:39 -0800, Eugene Zhuravlev (JetBrains)
<jeka@intellij.com> wrote:

If you are debugging an AppServer, its shutdown script will be executed.
And if the debuggee is an ordinary application, just close it.



0

C would work. On Fri, 03 Mar 2006 07:06:47 -0800, Eugene Zhuravlev (JetBrains) ]]> wrote:

How would you close the application if it were started from the command
line?

>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

0

I don't think I could suggest you anything in this situation....
It is technically not possible to issue something like ctrl-C when debugging. When you "run" the program from IDEA, it runs a
special launcher class which in turn starts your application. The 'exit' button tells the launcher to call System.exit(). When
debugging, no laucher is used thus we cannot provide such functionality.
The workaround is to modify your application so that it accepts some input from console or automatically calls System.exit(): this
will allow you to debug the shutdown hook's code. Even easier solution - just run the application with remote debug parameters and
then connect to it with the debugger.

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

wrote in message news:op.s5uhounci6m5li@epcxp-haidinyak.hightowersoftware.net... C would work. On Fri, 03 Mar 2006 07:06:47 -0800, Eugene Zhuravlev (JetBrains) ]]> wrote:

How would you close the application if it were started from the command line?

>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


0

Thanks for getting back to me on this issue.

-Pete

On Fri, 03 Mar 2006 09:11:00 -0800, Eugene Zhuravlev (JetBrains)
<jeka@intellij.com> wrote:

I don't think I could suggest you anything in this situation....
It is technically not possible to issue something like ctrl-C when
debugging. When you "run" the program from IDEA, it runs a
special launcher class which in turn starts your application. The 'exit'
button tells the launcher to call System.exit(). When
debugging, no laucher is used thus we cannot provide such functionality.
The workaround is to modify your application so that it accepts some
input from console or automatically calls System.exit(): this
will allow you to debug the shutdown hook's code. Even easier solution -
just run the application with remote debug parameters and
then connect to it with the debugger.

>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

0

Please sign in to leave a comment.