Spring's AOP may be among the worst offenders.
The OP suggested that they had already done this, but here's how you can disable stepping into specified classes (IntelliJ ULTIMATE 2018.2):
File -> Settings... -> Build, Execution, Deployment -> Debugger -> Stepping
... Do not step into the classes -> Add Pattern -> Enter the filter pattern:
... ... org.springframework.aop.*
Notice that you can use wildcards to disable entire namespaces -- so for example, assuming that your organization's namespace starts with com, you can get most of the way there by blacklisting org.*.
Spring's AOP may be among the worst offenders.
The OP suggested that they had already done this, but here's how you can disable stepping into specified classes (IntelliJ ULTIMATE 2018.2):
File -> Settings... -> Build, Execution, Deployment -> Debugger -> Stepping
... Do not step into the classes -> Add Pattern -> Enter the filter pattern:
... ... org.springframework.aop.*
Notice that you can use wildcards to disable entire namespaces -- so for example, assuming that your organization's namespace starts with com, you can get most of the way there by blacklisting org.*.
Currently there is no overall option to only target user code (like Visual Studio's 'Just My Code').
The best way to have the same behavior is to exclude specific code classes or packages (it is possible to setup filter patterns for class packages via wildcards) that will not be 'stepped into'.
This can be achieved within the Settings/Preferences, in the Debugger/Stepping options.
java - Debugger only stops at breakpoints, will not "step over" - Stack Overflow
IntelliJ: unable to debug
Why IntelliJ IDEA stucks at "stepping over" while debug? - Stack Overflow
IntelliJ IDEA Python debugging behaving differently; no automatic step-out at a return when doing step-over, instead full continued execution until next breakpoint is hit. It never did that before.
Videos
How do you build the project? If you build it with Ant or some other tool, make sure that compilation is performed with debug info enabled (debug=true for Ant javac task). Obfuscation and bytecode instrumentation during the build can also affect the possibility to debug. If you run under some non-standard JVM, it may also cause such problem.
When performing remote debug, ensure the target process is started with the correct JVM options suggested in the IntelliJ IDEA Remote debug configuration. Your wrapper configuration may pass them incorrectly.
Make sure you don't have a different jar on the classpath (other than the project) with the same classes. You could be stepping through the compiled classes and "breakpointing" in the sources.
Hi, I'm trying to debug my Java program, but for some reason, it doesn't start debugging from where I've set the viewpoints. I've debugged in a similar way a couple of times in the past, but for some reason when I try to use Shift+F9, my code is directly executed. May I know what to do? TIA.
Hi everyone, I've got a problem with IntelliJ IDEA when debugging a Python program. For some reason I observe the following behavior, which is unintuitive and I'm not used to it. It used to work differently, I'm pretty sure about that.
I have a breakpoint in a function. The debugger stops at that breakpoint. I step through the function with "Step Over F8". So far, so good, that works.
However, when I reach the end of the function (return) and hit F8 (step over) again, I would expect (and I'm sure it did so in the past) the debugger to step out of the function and continue step-by-step outside of the function, right after the function got called and returned. Instead, it just fully continues execution until the next breakpoint is hit. That's not what I want. I want F8 to again step out of a function at a return and pause execution right after the call of the function to be able to continue manual stepping outside of it. That's what it used to do. Why is it not doing that anymore?
Thank you!
IDEA version is 2024.2.1
Python Plugin version is 241.18034.62
Python version is 3.12.4
Update 1
Behavior seems somewhat erratic. When I add a breakpoint at the next expression after the function call at runtime, it is completely ignored, behavior as described above. When I add a breakpoint at the next expression after the call before starting the debugging session, the debugger steps out of the function, not even hitting the outside breakpoint yet. It works as I would expect it to work without the outside breakpoint, stepping out. When I remove the outside breakpoint, the behavior is again as described above, not stepping out.
I do not understand this behavior, it's completely unintuitive and currently makes my job really slow and exhausting.
Update 2
Runtime environment by the way is pytest, running the function from a unit test. Not directly, but as part of a bigger test.
On IntelliJ (2017.1.4 Community Edition), the following fixed the problem for me:
- File->Settings
- Type in "toString"
- Navigate to Build, Execution, Deployment->Debugger->Data views->Java
- Find the "Enable 'toString()' object view:" checkbox
- Uncheck the box
Re-run the debugger.
The following fixed it for me on IntelliJ 2018.2.4:
- Right click breakpoint
- Toggle the setting to suspend "Thread" instead of "All"
This won't be helpful if you actually need to suspend all the threads for debugging, but it got rid of the "Collecting data..." and "Waiting until last debugger command completes" messages for me. The setting also persists for subsequent breakpoints, so you only need to change it once.