Steps to Recreate Issues with Debugger in release 2022.2.2
已回答
I have had many issues with the debugger and trying to keep a record of steps to record the exact sequence that leads to problems. Here are the steps for today.
- Start PC and IntellijIDEA.
- Select Run->Debug Tomcat. Debugger stops at breakpoint. Error is found and fixed.
- Stop web app
- Run->Debug Tomcat. A new browser is displayed.
- Stop web app.
- Stop server
- Select Run->Run Tomcat (not debugger) - a new browser is displayed. Note: the two previous browsers are still displayed. This time, when running, the debugger takes over and stops inside the war_exploded file. Breakpoints are not visible because it is in the war file. It should not have stopped at break points anyway as I wasn't running the debugger. The "Debug" tab at the bottom is highlighted.
- Click the source code file to see the breakpoints.
- Click on "Step Over" and the debugger goes back into the war file, even though debugger shouldn't be running.
- Stop the web app.
- Go to "Services" and stop the server.
- Exit the war file and go back into the source code file.
- Run the web app by selecting Run->Run Tomcat. A new browser is displayed. We are back again at point 7. It just keeps going round in this loop.
- To get out of this loop, close all the browsers previously opened. Stop the web app. Stop the server. AND remove all breakpoints.
- Select Run->Run Tomcat. A new browser is displayed and this time it doesn't go into the breakpoints or the war file.
- CONCLUSION: There could be an issue with leaving breakpoints in the code when running the web app. But you shouldn't have to remove them because you may want to go back to them later and not have to go through all the code and remember where your breakpoints were. The web app should ignore breakpoints when running the app without the debugger. When the debugger is stopped it doesn't seem to be properly clearing things. No idea what causes it to go into the war file. This should never happen. I have done the work of your testers for you and this has taken considerable time. I deserve a discount on my next subscription. I have only just purchased a licence for twelve months. Sure hope you can get this debugger working properly. Perhaps I didn't follow the correct sequence of doing things, but even if that is the case, good software should not allow a user to get into such a pickle. One shouldn't be required to remove all breakpoints before running the app.
请先登录再写评论。
Hello,
Is it possible to provide sample project demonstrating the issue?
Hello Yaroslav
I am sorry but I don't want to give out the project I am working on. I do not have time at the moment to create a test project and play with it until I reproduce the problem. This isn't my job. It is yours. Nonetheless, I would love to get the issues with the debugger sorted out and if I get time in the future to recreate the problem with a "play" project, can you please tell me how I can send you my project code and/or the .idea folder. There doesn't seem to be a way to attach a zipped folder to a comment.
Thanks! There seems to be something related to project configuration as I couldn't reproduce the issue with test projects on my side. You may use JetBrains Uploads Service: https://uploads.jetbrains.com to upload project example.
Thank you Yaroslav. I will try to make some time in the next week to create a little project that reproduces this error because it happens to me a lot, like every day. If I'm doing something wrong I would like to know. But even so, it should be more helpful in letting me know what's happened if there is something I need to "configure". Thanks for the link. Once I have something useful to send I will do so.
Thanks! I'll be waiting.
Hi Yaroslav
I have so far managed to recreate only one of the problems with the debugger. I have uploaded my entire "pretend" project, including the .idea folder. Inside the zip file there is a READ ME.txt file explaining the steps to take.
What I am sending you is how the debugger stops in JavaScript breakpoints even though I am running in normal run mode and not debugger. It doesn't stop at the java breakpoints but I have seen this happen before and will keep working at it until I have a project to send you that demonstrates the problem. What I have uploaded is the first instalment for one problem.
The ID for the upload is: 2022_10_08_fAbEaHTq553tz13D7eoKMH
Please disable "with JavaScript debugger" option in your run configuration.
Thanks Yaroslav. This stops the debugger stopping at breakpoints in JavaScript when in run mode. BUT....
What you are saying is that when I want to debug in JavaScript, I must edit configurations and check the box "with Javascript debugger". Then if I want to go into normal run mode I must again edit configurations and uncheck the box "with Javascript debugger". A bit of a pain when one is switching from one to the other often.
Is there any documentation anywhere that tells users this is how it works. That if you go into run mode while "with Javascript debugger" is checked, it will stop at breakpoints in Javascript? Just wondering if I missed the documentation.
I don't think this is a good design. Because users must remember the steps or get caught out. Perhaps the next release will integrate the Javascript debugger a bit more seamlessly. I hope so.
There is still another issue I raised in a separate post about the Javascript debugger going into the war file instead of the source code while debugging. Not sure if this is somehow related to this issue, but looking forward to an explanation for that bazaar behaviour, which I haven't found a way to get out of.
Is there any documentation that describes how intelliJIDEA integrates with the Chrome browser. I do get confused about when to stop the server, the app, or just refresh the browser. Sometimes it starts a new browser and sometimes it doesn't, even if I have killed the browser and none are displayed. It sometimes does nothing. Sometimes it picks up new code and sometimes it doesn't. Is there some special sequence of steps a user must follow? Did I miss that documentation?
Option is described here: https://www.jetbrains.com/help/idea/run-debug-configuration-tomcat-server.html
> Is there any documentation that describes how intelliJIDEA integrates with the Chrome browser.
There is no separate documentation. But if we are talking about application servers there is "Update action": https://www.jetbrains.com/help/idea/updating-applications-on-application-servers.html