2

In numerous debuggers (such as gdb, VisualStudio, ...), you can set next execution line almost arbitrarily within the same stack frame. I did not find this under IntelliJ IDEA Community 2017.2.5, when debugging a Java program (JIT mode), neither did I find any relevant article to this topic. It seems to me hard to believe they'd just leave out this rather handy feature. Is it only the Community version, or did I miss something important here ?

Edit: 20.2. 17:50 I suspect this is/will not be supported by Jet Brain at all.. But there is supposedly a Chronon plugin worthy to try... Maybe it solves.. However, this seems to be only free with Ultimate versions of IntelliJ.

Edit 21.2.9:09 JetBrains openly admits this feature is not supported in IntelliJ

ChrisW
  • 54,973
  • 13
  • 116
  • 224
Sold Out
  • 1,321
  • 14
  • 34
  • What do you specifically want to happen when you "force" the line to execute? Do you want to remain where you are or do you want to advance the debugger step? – Makoto Feb 20 '18 at 15:36
  • @Makoto For instance, I'd like to be able to override a negative `if (false) {...}` statement and force the debug cursor (i.e. current exe line) to execute the next line inside the if block at my 'step' command. – Sold Out Feb 20 '18 at 15:41
  • If it were a variable, you could reassign it and then execute the flow in a different way. I don't believe that there is any way to override a constant expression on that. – Makoto Feb 20 '18 at 15:42
  • @Makoto I have given a minimalistic example, to make my idea clear. In reality there are less trivial cases, where you want to skip few lines WITHOUT execution, or return cursor few lines up (re-execute some lines with changed local variables..), or .... – Sold Out Feb 20 '18 at 15:45
  • Related: https://stackoverflow.com/q/2367816/1079354 – Makoto Feb 20 '18 at 15:58
  • @Makoto Thanx for the link. I've noticed this feature (drop frame). Its a bit similar principle, though not the same thing .. – Sold Out Feb 20 '18 at 16:37
  • Looks like Chronon shouls help: https://www.jetbrains.com/help/idea/debugging-with-chronon.html – y.bedrov Feb 21 '18 at 08:04

0 Answers0