garyttierney / intellij-ghidra

An IntelliJ IDEA plugin for working on Ghidra Extensions.
91 stars 19 forks source link

Help wanted about IDEA Project #38

Open Yatogaii opened 4 months ago

Yatogaii commented 4 months ago

I'm a newbie to java development, now I'm trying to develop a ghidra script with IDEA. Thank you in advance for your development of this plug-in🥰.

Now that I have done "Add a Ghidra Facets to Project Structure" and "Add a new Ghidra Launcher in Configurations, " I can get a fully completion suggestion and script result in Ghidra Script Manager.

But when I run my script in IDEA, it first show can't find a class about Log4j , after I manually add the log4j-core and log4j-api to my project, I have rerun the script in IDEA's Ghidra Launcher, it just stuck on (LoggingInitialization), like this: image

I have no idea what to do to solve this, sorry for my pool English, any suggestion would be aprreciate😘😘😘😘😘

Yatogaii commented 4 months ago

PS: I'm running Ghidra on Fedora39 with KDE Plasma

garyttierney commented 4 months ago

Hey,

It shouldn't be necessary to add the log4j dependencies to your own project, the plugin should be handling that for you. Could you share a bit more information about your project (i.e. do you have a standalone Java project containing scripts, or are you opening your ghidra_scripts folder)?

Though one thing to mention is that intellij-ghidra currently can't run scripts directly. What it can do instead is launch Ghidra with a debugger attached and allow you to set breakpoints on your scripts.

Yatogaii commented 4 months ago

I'm sorry for my lack of description!

I have IDEA Ultimate 2023.2.6 and intellj-idea 0.5.0 installed.

Is there anything I have missed? Thank you for being so helpful!

garyttierney commented 4 months ago

Nothing wrong with your approach, that should be working. Looks like potentially a bug in the plugin. I'll reproduce your steps and get back to you.

lcian commented 3 months ago

Hi, I have the same problem. I am using IntelliJ 2024.1.1 Ultimate Edition. I have tested it with OpenJDK 17 but also other JDKs. @Yatogaii have you found any workaround?

Yatogaii commented 3 months ago

@lcian Sorry, I haven't found a solution either🥹🥹🥹.

deniska-iriska commented 3 months ago

The same behaviour

deniska-iriska commented 3 months ago

Looks like plugin unproperly import third-party libs. As example log4j from "Ghidra/Framework/Generic/lib/log4j-core-x.y.z.jar" or flatlaf from "Ghidra/Framework/Gui/lib/flatlaf-x.y.z.jar". If I manually import flatlaf, then 2 more lines of logs appear in the console

cong0221 commented 1 week ago

@deniska-iriska I encountered the same situation. Are there any solutions available at the moment?

deniska-iriska commented 3 days ago

@cong0221, nope. I just started using IDA Pro