I want program's unexpected crash but this message interrupt when debugging...
how can I turn off message below??
Related
When I was using Visual Studio 2017 my code was read-only until I hit "break all" or a breakpoint. I'm pretty sure this was out-of-the-box without me changing any option. I'm talking about Windows desktop development with C# and edit-and-continue.
With 2019 I'm always able to change the code, but since the debugger is not paused the change, highlighted with a green squiggle, can't be compiled on the fly.
With 2019 I'm always able to change the code, but since the debugger is not paused the change, highlighted with a green squiggle, can't be compiled on the fly.
This is the "expected behavior" since VS 2019 16.3. It was reported as a bug/regression on developercommunity.visualstudio.com under Able to type while debugging back in Oct 2019, and was resolved as "Closed - Not a Bug". Quoting from the Microsoft-sanctioned comments:
This behavior you described is expected for Visual Studio 16.3. We went through several changes on Edit and Continue and now allow editing the code while the application is running. Any errors or warnings regarding your changes will show up at the Error List Window. In order to apply these changes, you simply have to be on a break state (e.g. break all or stop on a breakpoint) and continue from there.
[...]
The new design allows you to edit the code while running, however these changes won't be actually applied until you stop at a breakpoint or break your app, so you'll have pretty much the same behavior as before.
If you edit your code with Edit and Continue disabled, you'll be notified that the file changed (only if "Require source files to exactly match the original version" is checked), but you shouldn't be forced to restart the app.
I am facing an issue with Visual Studio 2019 (version 16.3.8), when starting an ASP.NET Core 3 WebApi project.
After clicking OK the project starts and runs without any issue. However the pop-up keeps nagging me every time I start my solution.
How can I stop showing it?
What is it trying to tell me anyway?
There seems to be two possible solutions to this, that at least worked for me being on Visual Studio 2019.
Solution
Goto Tools => Options => Debugging => General and then either enable Use Managed Compatibility Mode (thanks to Nan Yu) or disable Enable property evaluation and other implicit function calls.
The second solution faces the drawback that when being in break mode, we have to manually hit refresh on the locals window to see a variables content.
Background
The message is telling us, that our system state may get changed when being in break mode due to implicit property evalution.
By default, we tell Visual Studio debugger to try and evaluate properties implicitly.
This of course requires running code while we are braked, and not only display memory content.
Running code, might potentially change the state of the system, which is not always what we want.
For example, I might be increasing a counter every time the property is accessed,
which means that when the debugger will try to evaluate the property, my code will run,
the counter will be incremented, and my system state is changed, even though I am braked.
https://blogs.msdn.microsoft.com/eliofek/2012/12/12/why-do-we-get-the-function-evaluation-requires-all-threads-to-run/
I had some variables in my watch window that was causing this error popup to happen. Just remove them from your watch window and the error popup should no longer display.
Some time ago, Visual Studio 2019 told me that the "Output" window caused a Visual Studio start-up delay of X seconds and offered me to hide the window on start.
I accepted that offer, and now, after some time, I discovered that having to re-pin the Output window once per Visual Studio session is super-annoying, and that I would like things back the way they were before.
I browsed through the Visual Studio options (specifically Environment/Startup and Environment/"Tabs and Windows"), but I did not find an option to undo that change. What did I miss?
I know that I could reset Visual Studio to default settings, but I want to avoid that, because then I'd lose all my custom settings. (No bounty will be awarded for suggesting this, unless the answer also proves that there is no other option.)
I also know that I could pin the output window and then "save" the layout as a custom layout. I don't want that, I want to modify the "default" layout loaded on start.
(Rubber-duck debugging at its best: 5 minutes after starting a bounty I find the solution myself. Go figure!)
In the Visual Studio menu, go to Help/Visual Studio Performance Manager, which brings up this helpful dialog:
Setting this option back to "Use default behavior" fixes the issue.
I'm trying to "Debug Managed Memory" with Visual Studio 2015 Enterprise Edition. The file is at 1.2GB and after while loading I get the error message "Memory analysis could not be completed due to insufficient memory" after have been pressing "Debug Managed Memory"
What can I do to still be able to look into the memory with the pdb files? Can I start Visual Studio 2015 with more memory (the computer has 25 GB memory free) I guess it has to do with Visual Studio being running with x86.
It could be related to VisualStudio bug
see the following link
https://connect.microsoft.com/VisualStudio/feedback/details/2621837/debug-managed-memory-for-10-gb-memory-dump-files
as a workaround they are suggesting about turning off automatic symbol loading before starting analyzing dumps (i.e. Tools -> Options ->Debugging -> Symbols -> Select "only specified modules")
This error not apperas when project compiled to x64 platform
I am writing a COM+ component in Delphi 2009 on Windows 8. (I will move on to XE3 soon but for now it's D2009).
I have had quite a few IDE freezes when debugging regular simple forms applicaitions, mainly when closing the application after having stopped in a breakpoint and continued running the following code, but other than that D2009 works fine.
Now, the problem I have is that I am unable to debug the COM+ component. A new instance of this component is created from another forms application. If I specify that form applicaition in the "Run" options dialog of the project, it all works fine but no stop at the breakpoints in the COM+ object. I then found online about the way to debug by putting dllhost.exe in "run" with "/ProcessID: GUID" in the parameters. I double checked everything and all I see when I hit F9 is "Thread entered" then "Thread exited" in the debug console. Still not stopping at any breakpoints which all show up as out of running scope.
How can I do it then please ?
Thanks !
Check your components COM+ configuration. To correctly debug need Pool Size = 1 (Pooling & Recycling) and the component identity in "interactive user"