-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interactive debugging UX is confusing (runtime pausing/bp setting) #2648
Comments
Hi! If you have some suspicions on what the issue may be for this, I"m happy to take a look (I have some limited Intellij plugin experience). I am diving into a new project in Perl that involves a lot of legacy code, and it would be very helpful if the breakpoints in the debugger worked again. Please feel free to reach out if you want some help, or if you could prioritize this issue, it would be great. Thank you so much!! |
Could you please describe exact reproduction steps? And perl/ide/plugin versions. |
Absolutely. As requested, here are some preliminaries:
Steps to reproduce:
I would expect the break point to be stopped at, and then I could press F9 and stop at it again the next time it hits... the debugging functionality works fine for stepping over code, and going line by line... but when you have a loop with 1000's of iterations (and most of them being thrown away by a "next unless" it makes for slow and painful debugging. Happy to help in any way I can to get this fixed! Thank you again!!! |
plugin is still unstable with 241. Lot of bugs. |
My understanding from other co-workers of mine is that this hasn't been working for the last six plus months (so from 2023.2 onward). Are you able to reproduce with the information I provided? |
Didn't try yet. Going to on the weekend. |
Sounds good. Thank you for letting me know! I'll follow up with you next week. |
Did you have a chance to look at this over the weekend? I'm happy to take a look if you can point me in the right direction of where you think the problem may be... |
I did some work on plugin, but not your particular issue yet. Trying to fix some exception in 2023.3 and 2041.1 As I mentioned above - first i would check if your mapping is correct. The symptom looks like it is not. |
Hello, You are right -- my mapping was incorrect. After fixing the mappings, I was able to use breakpoints, but only if they were defined before starting the debugger (or are defined while a breakpoint is active). For me, this use case is more-or-less fine. However, a co-worker of mine also had this issue, and it was communicated incorrectly to me. If you try to set a breakpoint while a program is running, it does not work. It only works if a breakpoint was defined before execution of the program. This is a problem for us. It turns out that you have hit on this issue once before here, in one of your YouTube videos: https://www.youtube.com/watch?v=kzG0GmWRZts. If you start watching from minute 37:30 to minute 39:00, you'll see where you hit the issue. If you could point me to the place in the code where this occurs, I can take a stab at fixing this, and send a pull request to you. I'm a Java developer with some Intellij plugin experience. Thanks so much for your help. Looking forward to hearing from you! |
Most likely problem is in perl part of the debugger. Not the IDEA part. |
debug-option-not-working.movThat option doesn't seem to work. Please see the uploaded screen capture video to show you the steps that were taken. I have tried all of the various options in the run/debug configuration option, but they don't work. In the screen capture, I just selected the option to allow "breakpoints while script is not paused, moderate overhead". This is running the master branch of the Perl plugin from Github on the latest IntelliJ IDEA community edition for plugin development. |
I would love to see this get fixed too. In the video posted by @aaron-j-garcia, I see that the pause button is never enabled in the UI, even though the option to allow pausing the running program was selected. I'm happy to have a look at the plugin code for this, if you can provide a hint as to which files to look at. |
Ok, now I remember what is going on there and why. Here is a little story: Perl has no usable threading (at least it didn't for sure), may be now something changed. So, unlike ruby, for example, where I create a separate thread to interact with debugger in kinda parallel, in perl I need to do everything synchronously and in the same thread. Basically, perl debugger api have several hooks i can use:
So debugger needs to check if there are new commands from the debugger in one of those hooks. Here is related commit: Camelcade/Devel-Camelcadedb@d5b2db7 Example demonstrating working behavior:
My thoughts on this right now:
|
This probably could also be solved with some native threading communication code, which will span the system thread, interact with debugger and propagate commands to the perl code somehow, but this is os-dependent stuff as far as I know windows needs a special treatment for threads, also may have some compatibility issues with native API, so i'm not ready for this. |
Thank you for the additional details on how the plugin interacts with the perl DB. I was assuming it had to be something like how you described given the limitations of the perl platform (or some sort of signal handler that traps, but that too has problems). But before any of what is described here can be invoked, the UI in the IDE has the pause button disabled. While test case provded by @aaron-j-garcia does not have a subroutine call in the loop, the user interface still has disabled the pause button, which must certainly be a bug and not just a usability issue. |
Ye, this most likely caused by JetBrains/intellij-community@e9a81e6 Previously it was enabled when not paused, but now it needs a special treatment. |
Previously it was enabled by default, changed in JetBrains/intellij-community@e9a81e6 Intended behavior is - the button is always enabled to promote the feature, but if user presses it when action not available, he gets a notification with an explanation. Fixes #2648
Previously it was enabled by default, changed in JetBrains/intellij-community@e9a81e6 Intended behavior is - the button is always enabled to promote the feature, but if user presses it when action not available, he gets a notification with an explanation. Fixes #2648
Need to investigate and test this
The text was updated successfully, but these errors were encountered: