is there a way in Kotlin and Idea to programmatica...
# random
e
is there a way in Kotlin and Idea to programmatically have the execution stops (like a breakpoint) when in debug mode?
l
If you click on the breakpoint I believe you can write a code condition for when to break it. Is it what you're looking for?
e
I know that, but I wonder about that logic directly in the test source
l
You want to persist the breakpoint logic in the project itself? The good old
Copy code
foo()
bar()
debugDoNothing()
baz()
might be a good indicator to "place your breakpoint here", and you could add your code to it. As it's a test source, I don't think the extra branch will be a big performance issue
k
Do you mean like how you can do it by calling the C++ WinApi
DebugBreak()
or the .NET Framework's
System.Diagnostics.Debugger.Break()
? I don't think there's any such facility.
👍 1