History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-5440
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Eugene Zhuravlev
Reporter: AdvancedTools Support
Votes: 0
Watchers: 2
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

Debugger pane needs 'Exit application' button as in Run

Created: 23 Sep 07 22:50   Updated: 27 Jul 08 18:14
Component/s: Debugger, Plugin Support. DevKit
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 7,291
Severity: Medium


 Description  « Hide
When developing plugin there is no way to gracefully request sandbox IDEA instance to exit from master IDEA instance.
Thus any time it start the sandbox IDEA caches are being rebuilt from the scratch.

 All   Comments   Work Log   Change History      Sort Order:
Eugene Zhuravlev - 20 Nov 07 15:38
Does the request apply to running IDEA instance only or to any java process?
The problem is that there is no generic API to request gracefull shutdown and currently running IDEA is just another java process from debugger's point of view.

AdvancedTools Support - 20 Nov 07 19:59
I think this feature should be applied to any java process (e.g. application server also should be gracefully shut down).

Eugene Zhuravlev - 21 Nov 07 10:48
As I said, the lack of API does not allow us to implement this for any process. As for the application server, if it is started with the dedicated run configuration, the gracefull shutdown is implemented by invocation of the special "shutdown" script. But this is definitely, not a generic solution.

AdvancedTools Support - 21 Nov 07 14:20
Weird, in Run configuration IDEA has the button but for Debug you say it is not possible.
Just for clarity, I meant sending Control + C (on Windows) for the debugged process. Apparently, remotely debugged process will not have this option.
I lowered the issue priority since current IDEA version does not rebuild caches each time when forcibly stopped and restarted.

Sascha Weinreuter - 21 Nov 07 14:24
I'm not sure if you can send Ctrl-C to a process without a console, but even though it's a tricky thing, I guess it should be possible to inject some JNI code into the running process that executes System.exit() - at least under Windows. I believe the stacktrace tool from www.adaptj.com does something similar.

Although this could be overkill here...


Eugene Zhuravlev - 21 Nov 07 15:06
Sascha is right - ctrl-C is impossible to send without involving JNI

AdvancedTools Support - 21 Nov 07 17:36
Come on, I do not believe that debugger can not invoke System.exit in debugged VM, doesn't it already supports 'evaluate expression'...

Eugene Zhuravlev - 27 Jul 08 18:14
Debugger can invoke System.exit(), but:

1) this can be done only if the debuggee is suspended as a result of breakpoint request (JPDA restriction). If VM is suspended by pressing "Pause", method evaluation won't work

2) On attempt to evaluate this expression , the debuggee hangs.

Even if the debuggee were not hanging, item (1) makes such approach hardly applicable. And because of (2), the approach simply does not work.