1

Is there a way to somehow add breakpoints to all lines where some code is called outcluding method definitions since it takes a long time to debug it.

I got a messy code where I need to add some new functionalities but I just can't find them by following the code. It's like something is initialized on the start but I can't find where or what.

  • 1
    I don't understand your question. :/ `add breakpoints to all lines where some code is called outcluding` -> add a breakpoint where your app starts (main()?) and press step step step step. I don't get the "outcluding" I guess you meant `excluding`? Have you taken a look at the Breakpoints in IntelliJ? (CTRL-SHIFT-F8 by default I think). You can add conditions, and see the "global" breakpoints, etc. If you see what you want there, then that's how you do it, otherwise... use a lot of step debugging + print statements... or better yet, refactor the "messy code" ;-) – Martin Marconcini May 25 '20 at 11:44
  • Hmm, I thought is there a way to add breakpoint to all lines besides like public string function and so on. It has like 1m+ lines and I cant just go through everything and click one by one line.... –  May 25 '20 at 11:50
  • I hear you, but what you're asking is a very _specific_ thing (that would rarely/never be used under normal circumstances). If "1m" lines of code is too much (it is!) then perhaps you may want to spend your time writing a small custom plug-in. [Here's the documentation](https://www.jetbrains.org/intellij/sdk/docs/intro/welcome.html). It's not hard, but you're going to have to learn about it (or perhaps search for an existing). – Martin Marconcini May 25 '20 at 12:26

1 Answers1

1

You can use the plugin "Simple Toogle All Method Breakpoint", with a right click on the project folder you can toggle Breakpoints at all methods of your project.

davebo92123
  • 95
  • 2
  • 9