Hmmm... It's rare that I debug NiFi code. And it's also rare that I debug my own in that context since the NiFi test runner allows me to fend off most surprises via my JUnit tests.

I think back in 2016, I was debugging a start-up problem involving NiFi start-up and incompatibility with the Java Flight Recorder. As I recall, I downloaded the relevant NiFi code sources matching the version of NiFi I was debugging remotely. I remember ultimately making a slight (and only temporary) change to NiFi start-up that fixed the problem. At that point I must have been building my own copy to have seen it fixed.. It had to do with the order in which NiFi was getting command-line arguments making it so the JFR wasn't running. I'd have to dig back to figure out what I was doing, but it's probably not too relevant to what you need to do.

What do you need to see in this?

Russ

On 10/26/20 5:38 PM, Darren Govoni wrote:
Correct. Primarily the nifi-web-api module and AccessResource class. For starters.

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android <https://aka.ms/ghei36>

------------------------------------------------------------------------
*From:* Russell Bateman <r...@windofkeltia.com>
*Sent:* Monday, October 26, 2020 7:37:13 PM
*To:* Darren Govoni <dar...@ontrenet.com>; users@nifi.apache.org <users@nifi.apache.org>
*Subject:* Re: Run Nifi in IntelliJ to debug?
Darren,

This is just Apache NiFi code out of NARs you want to step through or is it yours? You haven't stripped debug information or anything, right?

Russ

On 10/26/20 5:30 PM, Darren Govoni wrote:
Kevin/Russel

Thanks for the info. I did set things up this way.

IntelliJ does connect to the nifi jvm and nifi runs and works but intellij isnt breaking on code it should.

I did set the module where the code/classes are located (in the remote connection dialog) and i see the exception im tracking print on the console output but intellij never breaks.

Is there an extra step needed? Generate sources?

For future it would be nice if there was a maven goal for debug.

Much appreciated!
Darren

Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Android <https://aka.ms/ghei36>
------------------------------------------------------------------------
*From:* Russell Bateman <r...@windofkeltia.com> <mailto:r...@windofkeltia.com>
*Sent:* Monday, October 26, 2020 4:09:50 PM
*To:* users@nifi.apache.org <mailto:users@nifi.apache.org> <users@nifi.apache.org> <mailto:users@nifi.apache.org>; Darren Govoni <dar...@ontrenet.com> <mailto:dar...@ontrenet.com>
*Subject:* Re: Run Nifi in IntelliJ to debug?
Darren,

I was out this morning and didn't see your plea until I got in just now. Here's a step by step I wrote up for both IntelliJ IDEA and Eclipse (I'm more an IntelliJ guy). It also covers using an IP tunnel.

https://www.javahotchocolate.com/notes/nifi.html#20160323

On 10/26/20 9:52 AM, Darren Govoni 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 <https://aka.ms/ghei36>



Reply via email to