IDEA CE 9 remote debugging
Hi all,
I have developed a plugin and it works really well in the development mode. But when I put it in the "plugin" folder and restart the IDEA, it shows all the icons I added to the plugin, but required screens are not coming. So my intention is to do a remote debug.
So can anyone please tell me how to do a remote debug(in local machine, and by another IDEA instance)
thanks in advance..
请先登录再写评论。
Hi Thisum,
Generally speaking, you need to do the following:
You can start by creating new 'Run Configuration' at IDEA - choose 'Remote':
IDEA shows the following dialog then:
It lists options to run to IDEA start configuration and allows to specify target remote host & port.
I.e. you should do the following:
Denis
Hi,
Thanks for the info. It solved my problem with remote debugging.
By debugging, I witnessed that the form panel I want to display is ok(not returning null). But the problem is, it just doesn't show the screen.
When I run the plugin in the developing mode, it shows the screen and no exceptions thrown, works well. And when run IDEA using batch file(after putting the plugin into the config->plugin folder), it once again works really fine.
But when I run the IDEA normally, the icons of the plugin are displayed(on the tool bar), But the required screen is not appearing. As I said when I did remote debugging, no problems encountered.
Is there any difference in running IDEA using the batch file and normally(idea.exe).
So what can I do regarding this issue?
Is there any other methods to show a screen(plugging)?
Thanks in advance..
Hello Thisum,
Are there any exceptions in idea.log when you run your plugin?
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hi,
No. There are no exceptions displayed.
But it shows some messages like:
2010-05-07 14:25:13,640 [ 9265] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $APP_CONFIG$/cachedDictionary.xml file is null
2010-05-07 14:25:13,640 [ 9265] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $APP_CONFIG$/cachedDictionary.xml
2010-05-07 14:25:14,328 [ 9953] INFO - ij.openapi.wm.impl.IdeRootPane - App initialization took 11294 ms
2010-05-07 14:25:16,593 [ 12218] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/gant_config.xml file is null
2010-05-07 14:25:16,593 [ 12218] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/gant_config.xml
2010-05-07 14:25:16,593 [ 12218] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/gradle.xml file is null
2010-05-07 14:25:16,593 [ 12218] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/gradle.xml
2010-05-07 14:25:16,937 [ 12562] INFO - TestNG Runner - Create TestNG Template Configuration
2010-05-07 14:25:17,359 [ 12984] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/dynamic.xml file is null
2010-05-07 14:25:17,359 [ 12984] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/dynamic.xml
2010-05-07 14:25:33,890 [ 29515] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/fileColors.xml file is null
2010-05-07 14:25:33,890 [ 29515] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/fileColors.xml
2010-05-07 14:25:33,953 [ 29578] INFO - s.impl.stores.FileBasedStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/projectCodeStyle.xml file is null
2010-05-07 14:25:33,953 [ 29578] INFO - .impl.stores.XmlElementStorage - Document was not loaded for $PROJECT_CONFIG_DIR$/projectCodeStyle.xml
2010-05-07 14:25:35,062 [ 30687] INFO - tor.impl.FileEditorManagerImpl - Project opening took 20244 ms
But these messages were keep coming when I was running IDEA using the batch file...
Hey Thisum,
I'm afraid we still don't have enough details here.
Can you create minimal but complete standalone example that illustrates the problem and post it here?
Regards, Denis
Hi,
Thanks for your reply and I will post an example.
But before that I have an idea which I think will solve the problem. So could you please give me a clarification regarding these things:
My problem is, plugin woks if I run IDEA using the .bat file. But doesn't work with the idea.exe
So when I looked at the bat file, it has :
:: ---------------------------------------------------------------------
:: You may specify your own JVM arguments in idea.exe.vmoptions file. Put one option per line there.
:: ---------------------------------------------------------------------
SET ACC=
FOR /F "delims=" %%i in (%IDEA_HOME%\bin\idea.exe.vmoptions) DO call %IDEA_HOME%\bin\append.bat "%%i"
set REQUIRED_IDEA_JVM_ARGS=-Xbootclasspath/a:%IDEA_HOME%/lib/boot.jar %IDEA_PROPERTIES_PROPERTY% %REQUIRED_IDEA_JVM_ARGS%
SET JVM_ARGS=%ACC% %REQUIRED_IDEA_JVM_ARGS%
SET OLD_PATH=%PATH%
SET PATH=%IDEA_HOME%\bin;%PATH%
SET CLASS_PATH=%IDEA_HOME%\lib\bootstrap.jar
SET CLASS_PATH=%CLASS_PATH%;%IDEA_HOME%\lib\util.jar
SET CLASS_PATH=%CLASS_PATH%;%IDEA_HOME%\lib\jdom.jar
SET CLASS_PATH=%CLASS_PATH%;%IDEA_HOME%\lib\log4j.jar
SET CLASS_PATH=%CLASS_PATH%;%IDEA_HOME%\lib\extensions.jar
SET CLASS_PATH=%CLASS_PATH%;%IDEA_HOME%\lib\trove4j.jar
SET CLASS_PATH=%CLASS_PATH%;%IDEA_JDK%\lib\tools.jar
So what I'm thinking is, if I set these parameters in the idea.exe.vmoptions file,it might work!!!!!
So could you please tell me how to insert these parameters in to the idea.exe.vmoptions file(basically syntax) ?
**please note that this is what I think and I don't know whether it will work. Please give me an explanation.
Thank you.
I sent the plugin to your email address (denzhdanov@gmail.com).
It works well when run by the batch file. But not by the idea.exe
Please give me a solution..
Thank you...
Hi Thisum,
Just tried your plugin and it doesn't display anything on attempt to create archive at my machine as well (Ubuntu Linux, IDEA 9.0.2, running from *.sh).
Unfortunately, you didn't provide plugin sources that can answer on what exactly goes wrong there.
Please, provide plugin sources as well or create minimal standalone example that illustrates the problem and send it to me.
Regarding idea.exe - it's built via 'exe4j' product, so, you can check it's documentation on how to twek java invocation parameters - exe4j Wizard - Step 5: Configure Java Invocation (note that exe4j *.pdf documentation contains much more examples about that). However, idea.exe encapsulates all of the settings you mentioned.
Denis
Hi,
Sorry for that. Now I have mailed you the source code. Please check it.
Thanks.
Hi Thisum,
Checked your plugin - it shows GUI if you make JarEditor not extend JPanel. I.e. it works after the following changes:
I'm not sure about exact details that prevent IDEA function properly when 'FileEditor' implementation IS-A JPanel/JComponent at the moment. Feel free to submit corresponding ticket to IDEA tracker.
Denis
Hi Denis,
Thank you very much for your support. This solution really works.
As you told when the Editor is extended JPanel, it has worked in IDEA 6. But hard to figure out the reason for not working in IDEA CE.
Anyway thank you very much for your help.
Welcome
Anyway, it seems worth to add a request about unexpected behavior in case FileEditor IS-A JPanel. I suspect that there is a bug somewhere in depth of IDEA editor GUI processing logic.