How can I view plugin log messages?
I'm testing the plugin by an autogenerated run config that launches another IDEA instance that has the plugin attached, these VM options are used:
-Xms128m -Xmx4096m -server -ea -Didea.system.path=/home/user/.macroannotation-ideaPluginIC/test-system -Didea.config.path=/home/user/.macroannotation-ideaPluginIC/test-config -Dsbt.ivy.home=/home/user/.ivy2 -Dplugin.path=/home/user/IdeaProjects/macroannotation_scala213/plugin/target/plugin/macroannotation-idea
I tried debug mode also, but I don't know where should I search for the log messages I generate in the plugin.
I use com.intellij.openapi.diagnostic.Logger, and use it like this:
private val Log = Logger.getInstance(classOf[TextBoxes])
Log.setLevel(Level.DEBUG)
Log.debug(s"TextBoxes loaded")
Please sign in to leave a comment.
Search for idea.log in your sandbox http://www.jetbrains.org/intellij/sdk/docs/basics/ide_development_instance.html#development-instance-settings-caches-logs-and-plugins
Yann Cebron What if the plugin is published and you want to debug the released one? (as the owner of the plugin)
Dr.jacky You mean from installation of user? They will need to provide you log files manually from their machine.
Yann-Cebron What a coincidence, I happen to need to know the answer to this question.
My plug-in project runs normally in the sandbox, but errors occur in the actual software after it is released. I need to view the corresponding real-time logs locally. What is the solution?
Now I can only view the logs in real time through the logger.error method, which is really inconvenient.
yijie4188 Sorry I don't understand your situation. What is “in the actual software”? The plugin running in the user's IDE? Then see my previous reply.
Yann Cebron I compiled a plug-in, and then installed the plug-in on my local installation of WebStorm or IDEA.
What should I do if I want to view the logs like in Sandbox IDEA.
https://plugins.jetbrains.com/docs/intellij/ide-infrastructure.html#logging:
To locate the log file, choose the Help | Show Log in Finder/Explorer action. When internal mode is enabled, the currently running IDE log file can be opened using Help | Open Log in Editor.
Thank your help very much.