Debuging plugin in Intellij idea 2020 sandbox issue

Answered

Hello!

I am trying to debug my plugin via Intellij Idea. 

My goal is to run new instace of Intellij idea 2020, but i get this error message:

 

Error:Internal error: (java.io.FileNotFoundException) C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1\plugins\intellij.plugin\META-INF\plugin.xml (The system cannot find the path specified)
java.io.FileNotFoundException: C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1\plugins\intellij.plugin\META-INF\plugin.xml (The system cannot find the path specified)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:292)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:185)
at com.intellij.openapi.util.io.FileUtil.openOutputStream(FileUtil.java:432)
at com.intellij.openapi.util.io.FileUtil.performCopy(FileUtil.java:401)
at com.intellij.openapi.util.io.FileUtil.copyContent(FileUtil.java:395)
at org.jetbrains.jps.incremental.FSOperations.copy(FSOperations.java:412)
at org.jetbrains.jps.incremental.artifacts.instructions.FilterCopyHandler.copyFile(FilterCopyHandler.java:40)
at org.jetbrains.jps.incremental.artifacts.instructions.FileBasedArtifactRootDescriptor.copyFromRoot(FileBasedArtifactRootDescriptor.java:88)
at org.jetbrains.jps.incremental.artifacts.IncArtifactBuilder.build(IncArtifactBuilder.java:160)
at org.jetbrains.jps.incremental.artifacts.IncArtifactBuilder.build(IncArtifactBuilder.java:50)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTarget(IncProjectBuilder.java:1036)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:1017)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1073)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:967)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:796)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:378)
at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:178)
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:140)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:297)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:130)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:232)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:830)
Please perform full project rebuild (Build | Rebuild Project)


With previous versions everything works fine.

In my opinion, the problem source is that Intellij 2020 doesn't create plugin sandbox.

Is there any another way to debug plugin with Idea 2020?

0
5 comments

Anton,

1. How do you debug your plugin?

2. Do you use Gradle?

3. What's the location of the plugin.xml in your project?

0

1.

1.1. Set Run/Debug Configuration as Plugin

1.2. In the project settings set module SDK according to Intellij idea version I want to debug.

1.3. Press 'Shift + F9'

2. No, I use Maven.

3. IdeaPlugin/src/main/resources-templates/ru/META-INF/plugin.xml

0

If you're using the DevKit to manage the plugin (not the Gradle), your plugin.xml should be located in the META-INF directory which is supposed to be in root of the project.

Check the Plugin Content documentation page for more details. 

0

If we are talking about .jar file (already packaged plugin), my plugin.xml located in the META-INF directory which is in root of the project.

0

But looking at your path from 3. there is something uncommon regarding your project structure.
I'd advise you to use the gradle-intellij-plugin (https://github.com/JetBrains/gradle-intellij-plugin) which allows to manage the plugin development lifecycle with ease - bundling, debugging, releasing and dependencies management.

0

Please sign in to leave a comment.