rascal freezes when I am trying to debug a program - rascal

occassionally, and without a specific pattern, I run into a situation where the rascal interpreter does not proceed with a debugging session. In the progress window, I get the message:
Reconnecting importers of affected modules: running command.
However, the progress bar remains static. What is causing this to happen? I cannot seem to rid this even if I restart eclipse. It usually starts happening after I start a debug session in a buggy code, then insert a few breakpoints.

Although this is not really a coding question; it may be this is the same UX feedback problem that I've experienced. Since Eclipse Luna and the latest Keppler updates, only when you go into the Debug perspective you see that Rascal is pausing on a breakpoint and the cursor jumps to the right editor. From that view you can then press the Run button to continue finishing the run.

Related

Debug Delphi Project Step by step

Is there is a way for debugging Delphi program in Rad studio with graphic output?
This means even graphic output(the command that has graphic output like print or shows a message and ...) run step by step.
For example inside loop command, we put print or add an item into list view and if we debug this part we can see the result in the form step by step? each turn of the loop show one print or adding to the list separately(by pressing F7 or F8 for debugging)
I hope I have asked my questions correctly.
Thanks
Is it possible to Debug Delphi applications in the way you describe? I'm afraid it is not.
Why not? Both application logic and UI rendering are done within the main thread. And when you set a breakpoint at certain line of code it stop the execution of the entire thread that the code is being executed from.
Since most if not all of your code is ran from main thread setting a breakpoint halts execution of the entire main thread of the application and thus prevents application windows to be redrawn.
In fact since redrawing of windows content is done during idle time of your application it means that running any long loop inside main thread means that the application UI will be updated only when the loop is finished.
You could theoretically force your application to update its UI on each loop cycle by calling Application.ProcessMessages before halting the code on a specific breakpoint.
But using ofApplication.ProcessMessages is not recommended as it could lead to scenarios where messages are not handled in expected order and thus could potentially cause you more problems elsewhere.
Also calling Application.ProcessMesages could seriously affect your application performance so if you decide to use it only use it for Debugging purposes.

Is there a way to switch of the possibility to edit code while debugging but NOT in break mode

In Visual Studio 2019 developing C#.NET I'm able to edit code while debugging even if not in break mode. With earlier versions I used to get the message 'Changes are not allowed while code is running'. Now I can start to write but the code is wavy underlined and I'm not able continue without stopping and recompiling.
I tried to disable Tools->Options->Debugging->General->Enable Edit and Continue but that has no effect. I find this behaviour very annoying.
Hoping for a hint to get it to work like it used to.
Got this answer from Microsoft. May it help someone else too. :-)
In VS 2019 we allowed you to edit files even when the application being debugged is running. This wasn’t possible before as you have observed. These edits can’t be applied until after the application transitions to a break mode (e.g. a breakpoint is hit, or “Break All” command is issued). That’s why a squiggle is displayed on the changed text span to notify you about the fact that the change hasn’t been applied yet. Once the application transitions to a break mode these squiggles should disappear. If the changes are allowed to be made they will be applied once you resume the execution of the application (“Continue”, or “Step” commands are issued). It is not necessary to stop debugging and recompile, unless the changes made are “rude”. In that case the squiggles appear again and will inform you why the particular change can’t be applied.

Why does Aptana Studio Freeze when I copy and paste?

Randomly, so not every time, when I paste something into my code on Aptana Studio 3.4.2 it will freeze up, giving me the cursor loading/wait icon, then will in a few seconds go into "Not Responding", so I minimize it and after a few more seconds it will flash and become active again. It's getting really annoying trying to work on something when this keeps happening.
Nothing else freezes up on my computer during this, just Aptana, and it only happens when Pasting into the page I'm working on. SO ANNOYING I'm about ready to ditch Aptana but I like it other than this annoyance... It just started recently...also if I reboot or wake the computer up from sleep (with app closed) then it is fine for awhile. But then it's much more common when it finally "kicks in".
So ...what can I do to fix this?
Not sure it will help you, but try to increase the memory allocation
go to AptanaStudio3.ini and change to:
-Xms512m
-Xmx1024m

xcode triggers same breakpoint repeatedly only when stepping through

I'm on Xcode 4.5 (although this has happened with previous version) and I find that when I set breakpoints, sometimes they hit repeatedly whereas NSLogging my logic is only traversed once. I've ruled out the usual suspects such as some basic problem in my logic that is inadvertently calling into the breakpoint when the program stops at one. My conclusion is that there is a bug with the debugger that makes the breakpoint hit repeatedly, but this seems to happen even when I step through a few lines of code then continue to run.
Has anyone seen this occur before or even better know a way to alleviate this issue?

Debugger displays useless info on user breaks

It's a silly point, but I haven't been able to find the answer by myself :
In delphi 2009, when I hit the "pause" button ("Suspend program execution") while debugging, the IDE pops the CPU window, and shows me the execution point and stack of the thread which actually stopped the execution, instead of the main thread - which is almost always what I would like to see.
I then have to manually go to the "threads" window, and double click on the "Main" line to have the debugger display the stack I am concerned with.
Is there a setting to tell the IDE "Hey, when I break manually, show me the infos about the main thread, not about the debugger thread"?
This SO question deals with the same issue. Sounds like the best solution is to use "Run/Run to next source line" if that still works in your version of Delphi. It doesn't sounds like the registry edit suggested there (or here) has been a consistent solution, but it's possible that people are using the wrong version number in the registry key. Hope this helps.

Resources