Hi! Here instructions for running MiNiFi (debugging) within IntelliJ IDEA, practically the same steps for NiFi.
shorturl.at/bkloI -- Javi Roman Twitter: @javiromanrh GitHub: github.com/javiroman Linkedin: es.linkedin.com/in/javiroman Big Data Blog: dataintensive.info On Mon, Oct 26, 2020 at 6:08 PM Kevin Doran <[email protected]> wrote: > Hi, Darren - > > I am not aware of a method of running a full NiFi instance directly in > IntelliJ, but I use the method Matt mentioned: attaching IntelliJ as a > remote debugger to a running NiFi instance. > > I put together a guide a few years back for folks unfamiliar with this > process or new to IntelliJ: > > https://community.cloudera.com/t5/Community-Articles/NiFi-Debugging-Tutorial/ta-p/246082 > > The screenshots are for an older IntelliJ, but the same basic steps should > still work. > > Hope this helps! > Kevin > > On Oct 26, 2020, at 12:12, Darren Govoni <[email protected]> wrote: > > Thanks Matt. I think if i can attach remotely and step through the code > that will satisfy my needs. Let me give it a try. > > I also found how to run mvnDebug and attach to that from intellij. Just > need to find a maven goal that runs nifi but i havent seen one yet. > > Sent from my Verizon, Samsung Galaxy smartphone > Get Outlook for Android <https://aka.ms/ghei36> > > ------------------------------ > *From:* Matt Burgess <[email protected]> > *Sent:* Monday, October 26, 2020 12:05:03 PM > *To:* [email protected] <[email protected]> > *Subject:* Re: Run Nifi in IntelliJ to debug? > > Sorry I misread the part where you wanted to run NiFi inside IntelliJ, > I was talking about running it externally (from the command-line, > e.g.) and connecting the IntelliJ debugger. I haven't run NiFi itself > using IntelliJ, maybe someone else can chime in for that. > > On Mon, Oct 26, 2020 at 12:03 PM Matt Burgess <[email protected]> > wrote: > > > > Yes, that's a pretty common operation amongst NiFi developers. In > > conf/bootstrap.conf there's a section called Enable Remote Debugging > > and a commented-out line something like: > > > > > java.arg.debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 > > > > You can remove the comment from that line and set things like the > > address to the desired port, whether to suspend the JVM until a > > debugger connects, etc. Then in IntelliJ you can create a new > > configuration of type Remote, point it at the port you set in the > > above line, and connect the debugger. It will then stop at breakpoints > > and you can do all the debugging stuff like add Watches, execute > > expressions (to change values at runtime), etc. > > > > Regards, > > Matt > > > > On Mon, Oct 26, 2020 at 11:52 AM Darren Govoni <[email protected]> > wrote: > > > > > > Hi > > > Is it possible to run Nifi from inside IntelliJ with debugging such > that I can hit the app from my browser and trigger breakpoints? > > > > > > If anyone has done this can you please share any info? > > > > > > Thanks in advance! > > > Darren > > > > > > Sent from my Verizon, Samsung Galaxy smartphone > > > Get Outlook for Android > > >
