PluginTesting 

HOME INDEX SEARCH GO  

 <<O>>  Difference Topic PluginTesting (r1.9 - 14 Mar 2004 - JacquesMorel)
Changed:
<
<

Ariadna & Aurora do not allow 2 instances to run off of the same config and system directories. The trick is to copy both and have customized version of the startup script that point to these copies.
Attached are an example of these. They have been tested on build #695,#802 and #833.
There is a feature request on this here. Vote for it so we can get a more intuitive way to test IDEA plugins.

>
>

Aurora do not allow 2 instances to run off of the same config and system directories. The trick is to copy both and have customized version of the startup script that point to these copies.

Changed:
<
<

How to run a testing IDEA instance

>
>

Solution 1: zip download and custom startup scripts

Attached are an example of these. They have been tested on Aurora (up to 1177).
They assume that you are using the manual zip install, not the installer. While you loose the ipr file association you save on the size of a jre and reduce by half the download size.

Installation

Changed:
<
<

  1. Configure IDEA to put config and system directories in the install directory. See attached IDEA_DIR/bin/myidea.bat and IDEA_DIR/bin/idea.bat for a working solution.
  2. Duplicate the IDEA_DIR to IDEA_TEST_DIR (Alternatively use the attached IDEA_DIR/bin/migrate.bat to create a duplicate of IDEA_DIR. Change the path at the top of the script to follow you installation paths)
  3. Optionally delete all plugins

To test your plugin, you would then

  1. deploy the plugin to test's jar in IDEA_TEST_DIR/plugins
  2. run IDEA_TEST_DIR/bin/debug.bat
>
>

  1. Configure IDEA to put config and system directories in the install directory.

Notes

bin/debug.bat creates a copy of config and plugins in IDEA_DIR/test.
By default the script copies all plugins from your IDEA_DIR/plugins. If you want a clean environment, run debug.bat once, shutdown idea than delete them all manually or change the script.

Usage

  1. Run bin/myidea.bat to start a normal instance (the one to use to develop your plugin)
  2. Deploy your plugins to test in IDEA_DIR/test/plugins
  3. Run bin/debug.bat to start the second instance (the one to debug your plugin with)
Changed:
<
<

Debugging

>
>

Debugging

Added:
>
>

Bonus

I included my migration script migrate.bat that simplifies migrating from one version to the next. The script assumes 2 things

  1. IDEA_DIR is c:\java\IntelliJ. In the script it is the variable NEW. Just change it to point to your install directory.
  2. The migration occurs like this
    1. move c:\java\IntelliJ to OLD
    2. unzip new version to c:\java\IntelliJ
    3. run OLD\bin\migrate.bat

Solution 2: installer

  1. clone the directoy IDEA_DIR/bin, into IDEA_DIR/bin2
  2. create an empty directory IDEA_DIR/my/plugins and copy the plugin(s) to use in the second IDEA instance. This is where you will deploy the plugin you want to test, and remote debug.
  3. edit "lax.nl.java.option.additional", in =IDEA_DIR/bin2/idea.lax=
before:
lax.nl.java.option.additional=
         -Xms16m -Xmx128m -Dsun.java2d.noddraw=true 
         -Didea.popup.weight=heavy
         -Didea.system.path="..\\system"
         -Didea.config.path="..\\config"

after:
lax.nl.java.option.additional=
         -Xms16m -Xmx128m -Dsun.java2d.noddraw=true 
         -Didea.popup.weight=heavy
         -Didea.system.path="..\\my\\system"
         -Didea.config.path="..\\my\\config"
         -Didea.plugins.path="..\\my\\plugins"
         -Xdebug -Xnoagent -Djava.compiler=NONE 
         -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=ideadebug

Notes

  • the 3 path properties have the 2nd instance use its own plugins, configs...
  • the last line enable remote debugging (see below)

Usage

  1. to launch the 2nd instance, just run idea.exe from the /bin2 directory.
  2. to remote debug the plugin running in the 2nd instance, create, in the main IDEA, a remote debug configuration (see illustration attached)
Changed:
<
<

%META:FILEATTACHMENT{name="bin.zip" attr="" comment="unzip to IDEA_HOME\bin dir" date="1075911135" path="C:\java\IntelliJ\bin\bin.zip " size="1371" user="JacquesMorel" version="1.3"}%

>
>

%META:FILEATTACHMENT{name="bin.zip" attr="" comment="unzip to IDEA_HOME\bin dir" date="1079252589" path="bin.zip" size="1321" user="JacquesMorel" version="1.5"}%


 <<O>>  Difference Topic PluginTesting (r1.8 - 13 Feb 2004 - KabrielRobichaux)
Changed:
<
<

  1. Unzip bin.zip to your IDEA_DIR
>
>

  1. Unzip bin.zip to your IDEA_DIR/bin
Changed:
<
<

  1. Duplicate the IDEA_DIR to IDEA_TEST_DIR (Alternatively use the attached IDEA_DIR/bin/createIntelliJTest.bat to create a duplicate of IDEA_DIR. Change the path at the top of the script to follow you installation paths)
>
>

  1. Duplicate the IDEA_DIR to IDEA_TEST_DIR (Alternatively use the attached IDEA_DIR/bin/migrate.bat to create a duplicate of IDEA_DIR. Change the path at the top of the script to follow you installation paths)

 <<O>>  Difference Topic PluginTesting (r1.7 - 04 Feb 2004 - JacquesMorel)
Changed:
<
<

%META:FILEATTACHMENT{name="bin.zip" attr="" comment="unzip to IDEA install dir" date="1060409792" path="C:\java\IntelliJ\bin.zip" size="4408" user="JacquesMorel" version="1.2"}%

>
>

%META:FILEATTACHMENT{name="bin.zip" attr="" comment="unzip to IDEA_HOME\bin dir" date="1075911135" path="C:\java\IntelliJ\bin\bin.zip " size="1371" user="JacquesMorel" version="1.3"}%


 <<O>>  Difference Topic PluginTesting (r1.6 - 09 Aug 2003 - JacquesMorel)
Deleted:
<
<

Note on building Plugins on Win32 platforms

Windows locks files that are opened. You cannot just copy your new plugin over the old version while IDEA is running. There are 2 ways of handling this:

  1. Rename your old plugin before you run your development instance. That way since plugins are only loaded at startup time, you can build your plugin and deploy/copy it to the plugins directory to be picked up by your test instance.
  2. Make sure that your ant jar task updates the deployed jar under IDEA_DIR/plugins. That way only the content is updated. No file gets overwritten leaving Mister Bill happy wink Warning: sometimes your development instance might not have loaded everything from the old jar and will think that the updated one is corrupted. If you get this try option 1 instead.
Changed:
<
<

%META:FILEATTACHMENT{name="bin.zip" attr="" comment="unzip to IDEA install dir" date="1060111721" path="C:\java\IntelliJ\bin.zip" size="2973" user="JacquesMorel" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="bin.zip" attr="" comment="unzip to IDEA install dir" date="1060409792" path="C:\java\IntelliJ\bin.zip" size="4408" user="JacquesMorel" version="1.2"}%


 <<O>>  Difference Topic PluginTesting (r1.5 - 05 Aug 2003 - JacquesMorel)
Changed:
<
<

  1. copy both scripts to IDEA_DIR/bin
  2. copy ~/.IntellijIdea to ~/IntelliJIdea2 (Make sure you do not have a . before IntelliJIdea2 since it is not considered a valid file name by Windows Explorer and it won't let you create it)
    on windows it is under c:\Document and Settings\*[User name]*
  3. run debug.bat

Variation : To test your plugin in isolation (with no other plugin running), you can replace the 1st step above by

  1. duplicate the entire IDEA_DIR directory (eg. c:/idea_bis)
  2. delete all the plugins from IDEA_BIS_DIR/plugins
  3. copy both scripts to IDEA_BIS_DIR/bin
>
>

  1. Unzip bin.zip to your IDEA_DIR
  2. Configure IDEA to put config and system directories in the install directory. See attached IDEA_DIR/bin/myidea.bat and IDEA_DIR/bin/idea.bat for a working solution.
  3. Duplicate the IDEA_DIR to IDEA_TEST_DIR (Alternatively use the attached IDEA_DIR/bin/createIntelliJTest.bat to create a duplicate of IDEA_DIR. Change the path at the top of the script to follow you installation paths)
  4. Optionally delete all plugins
Changed:
<
<

  1. deploy the plugin to test's jar in IDEA_BIS_DIR/plugins
  2. run IDEA_BIS_DIR/bin/debug.bat
>
>

  1. deploy the plugin to test's jar in IDEA_TEST_DIR/plugins
  2. run IDEA_TEST_DIR/bin/debug.bat
Changed:
<
<

%META:FILEATTACHMENT{name="idea2.bat" attr="" comment="Inner script called by debug.bat" date="1047305775" path="C:\java\IntelliJ\bin\idea2.bat" size="2834" user="JacquesMorel" version="1.1"}% %META:FILEATTACHMENT{name="debug.bat" attr="" comment="Startup script to run IDEA in debug mode" date="1047306613" path="C:\java\IntelliJ\bin\debug.bat" size="618" user="JacquesMorel" version="1.1"}%

>
>

%META:FILEATTACHMENT{name="idea2.bat" attr="h" comment="Inner script called by debug.bat" date="1047305775" path="C:\java\IntelliJ\bin\idea2.bat" size="2834" user="JacquesMorel" version="1.1"}% %META:FILEATTACHMENT{name="debug.bat" attr="h" comment="Startup script to run IDEA in debug mode" date="1047306613" path="C:\java\IntelliJ\bin\debug.bat" size="618" user="JacquesMorel" version="1.1"}%

Added:
>
>

%META:FILEATTACHMENT{name="bin.zip" attr="" comment="unzip to IDEA install dir" date="1060111721" path="C:\java\IntelliJ\bin.zip" size="2973" user="JacquesMorel" version="1.1"}%


 <<O>>  Difference Topic PluginTesting (r1.4 - 26 Jun 2003 - AlainRavet)
Changed:
<
<

Attached are an example of these. They have been tested on build #695 and #802.

>
>

Attached are an example of these. They have been tested on build #695,#802 and #833.

Added:
>
>

Variation : To test your plugin in isolation (with no other plugin running), you can replace the 1st step above by

  1. duplicate the entire IDEA_DIR directory (eg. c:/idea_bis)
  2. delete all the plugins from IDEA_BIS_DIR/plugins
  3. copy both scripts to IDEA_BIS_DIR/bin

To test your plugin, you would then

  1. deploy the plugin to test's jar in IDEA_BIS_DIR/plugins
  2. run IDEA_BIS_DIR/bin/debug.bat
Added:
>
>


 <<O>>  Difference Topic PluginTesting (r1.3 - 11 Mar 2003 - JacquesMorel)
Changed:
<
<

  1. Delete your old plugin before you run your development instance. That way you can build your plugin and deploy/copy it to the plugins directory to be picked up by your test instance.
  2. Make sure that your ant jar task updates the deployed jar under IDEA_DIR/plugins. That way only the content is updated. No file gets overwritten leaving Mister Bill happy wink
>
>

  1. Rename your old plugin before you run your development instance. That way since plugins are only loaded at startup time, you can build your plugin and deploy/copy it to the plugins directory to be picked up by your test instance.
  2. Make sure that your ant jar task updates the deployed jar under IDEA_DIR/plugins. That way only the content is updated. No file gets overwritten leaving Mister Bill happy wink Warning: sometimes your development instance might not have loaded everything from the old jar and will think that the updated one is corrupted. If you get this try option 1 instead.

 <<O>>  Difference Topic PluginTesting (r1.2 - 10 Mar 2003 - JacquesMorel)
Changed:
<
<

There is a feature request on this here. Vote for it so we can get a more intuitive way to test IDEA plugins.

>
>

There is a feature request on this here. Vote for it so we can get a more intuitive way to test IDEA plugins.

Changed:
<
<

Plugin building on Win32 platforms

>
>

How to run a testing IDEA instance

Changed:
<
<

Windows locks files that are opened. You cannot just copy your new plugin over the old version while IDEA is running. There are 2 ways of handling this:

  1. Delete your old plugin before you run your development instance. That way you can build your plugin and deploy/copy it to the plugins directory to be picked up by your test instance.
  2. Make sure that your ant jar task points at the deployed jar under IDEA_DIR/plugins. That way only the content is updated. No file gets overwritten leaving Mister Bill happy wink
>
>

  1. copy both scripts to IDEA_DIR/bin
  2. copy ~/.IntellijIdea to ~/IntelliJIdea2 (Make sure you do not have a . before IntelliJIdea2 since it is not considered a valid file name by Windows Explorer and it won't let you create it)
    on windows it is under c:\Document and Settings\*[User name]*
  3. run debug.bat
Changed:
<
<

Installation steps

>
>

Note on building Plugins on Win32 platforms

Changed:
<
<

  1. copy both scripts to IDEA_DIR/bin
  2. copy ~/.IntellijIdea to ~/IntelliJIdea2
  3. run debug.bat
>
>

Windows locks files that are opened. You cannot just copy your new plugin over the old version while IDEA is running. There are 2 ways of handling this:

  1. Delete your old plugin before you run your development instance. That way you can build your plugin and deploy/copy it to the plugins directory to be picked up by your test instance.
  2. Make sure that your ant jar task updates the deployed jar under IDEA_DIR/plugins. That way only the content is updated. No file gets overwritten leaving Mister Bill happy wink

 <<O>>  Difference Topic PluginTesting (r1.1 - 10 Mar 2003 - JacquesMorel)
Added:
>
>

%META:TOPICINFO{author="JacquesMorel" date="1047306960" format="1.0" version="1.1"}% %META:TOPICPARENT{name="WebHome"}%

Plugin Testing

Ariadna & Aurora do not allow 2 instances to run off of the same config and system directories. The trick is to copy both and have customized version of the startup script that point to these copies.
Attached are an example of these. They have been tested on build #695 and #802.
There is a feature request on this here. Vote for it so we can get a more intuitive way to test IDEA plugins.

Plugin building on Win32 platforms

Windows locks files that are opened. You cannot just copy your new plugin over the old version while IDEA is running. There are 2 ways of handling this:

  1. Delete your old plugin before you run your development instance. That way you can build your plugin and deploy/copy it to the plugins directory to be picked up by your test instance.
  2. Make sure that your ant jar task points at the deployed jar under IDEA_DIR/plugins. That way only the content is updated. No file gets overwritten leaving Mister Bill happy wink

Installation steps

  1. copy both scripts to IDEA_DIR/bin
  2. copy ~/.IntellijIdea to ~/IntelliJIdea2
  3. run debug.bat

Debugging

Set up and debug an IDEA debugging configuration like this
IDEADebugConfiguration.jpg

%META:FILEATTACHMENT{name="idea2.bat" attr="" comment="Inner script called by debug.bat" date="1047305775" path="C:\java\IntelliJ\bin\idea2.bat" size="2834" user="JacquesMorel" version="1.1"}% %META:FILEATTACHMENT{name="debug.bat" attr="" comment="Startup script to run IDEA in debug mode" date="1047306613" path="C:\java\IntelliJ\bin\debug.bat" size="618" user="JacquesMorel" version="1.1"}% %META:FILEATTACHMENT{name="IDEADebugConfiguration.jpg" attr="h" comment="Debug configuration" date="1047306687" path="C:\My Documents\My Pictures\IDEADebugConfiguration.jpg" size="39462" user="JacquesMorel" version="1.1"}% %META:TOPICMOVED{by="JacquesMorel" date="1047308408" from="Main.PluginDebugging" to="Main.PluginTesting"}%


View | Diffs | r1.9 | > | r1.8 | > | r1.7 | More

e d i t a t t a c h r e f - b y d i f f s
Ideas,requests,problems regarding this site? Send feedback.
Copyright @ 2000-2003 by the contribution authors. All material on this collaboration tool is the property of the contributing authors.

Revision r1.1 - 10 Mar 2003 - 14:36 GMT - JacquesMorel
Revision r1.9 - 14 Mar 2004 - 07:34 GMT - JacquesMorel
Copyright © 2001 by the contributing authors. All material on this collaboration tool is the property of the contributing authors.
Ideas, requests, problems regarding this site? Send feedback.