Disable "Break Mode" page in VS2015 - c#

Recently migrated from VS2010 to 2015. Now when I pause a running app to work on it, I get this very annoying "Break Mode" page with "The application is in break mode". Well, no shoot Sherlock, I pressed pause. I know its in break mode. The page is annoying and takes me away from the code I was going to work on completely unnecessarily.
I didn't get this annoying page in 2010. I may have some setting switched back then on 2010 but too long to remember.
Is there a way to disable this silly break mode page in VS2015?

The best solution I've found so far is to drag the "Break Mode" tab to the bottom of your screen (so it is attached like a toolbar window) and make it as small as possible. Then when you pause and get this screen it at least doesn't cover your existing view.

There is a free extension to resolve this issue: Disable No Source Available Tab available for from the VS Market Place.
This small extension will prevent the tool window with title "No Source Available" from appearing in Visual Studio, and preserve the focus on the currently active tab.

Under Tools → Options → Debugging → CHECK "Use Managed Compatibility Mode"

I had this annoying problem, too and did not realise, that i turned the Exception Settings to "Break on all exceptions". Then there where some Exceptions in external Code, where the debugger stopped, but I could not see the code, as it was in a Framework. Pretty annoying.
To reset Exception Settings in VS2017:
ctrl+al+e -> right click on the opening window -> reset to defaults
Maybe this helps someone =)

Dont use this primarily. Use atchoum's solution. its the BEST.
Another option:
I like to use the keyboard instead of the mouse, so I invoke a pause with CTRL + ALT + BREAK(or you can click pause)
regardless this causes the annoying "Break mode" window to appear
When it comes up and assuming you still have the CTRL + ALT + BREAK keys held down- Just release the ALT and BREAK keys and hit the F4 key
This will close the annoying break mode window and take you to the page and spot your had the cursor on before you pressed the break combination of CTRL + ALT + BREAK.
So... in one foul swoop press
CTRL + ALT + BREAK (to enter break mode) and then
CTRL + F4 (to close the stupid "break mode" window and place the cursor where you were before you hit CTRL + ALT + BREAK )

I was having same problem and was tired of searching for a solution but, in end, I found out there was one error in my code at specific form; after changing that code I didn't got any break mode type error.
CODE WHEN ERROR (Break mode) OCCURRED
Private Sub TextBox1_TextChanged(sender As Object, e As KeyPressEventArgs) Handles TextBox1.TextChanged
CODE WHEN ERROR (Break mode) DIDN'T OCCUR
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
May be this can help so please check where and when your code triggers something.

To Disable "Break Mode" page go to:
Tools --> Options --> Debugging --> General
Uncheck the checkbox of "Enable Just My Code"

Related

Activate auto-complete for C# in Visual Studio 2019

I have the problem, that I get some suggestions for autocompletion
(for example, I type "Cons" and I get the suggestion for "Console"), but these can't be applied with the Return-key.
Normally, the suggestion is fully blue, and gets attached, when I press 'enter', but for some time now, the suggestion has a blue border and pressing 'enter' results in a new line.
Where can I change these settings, so IntelliSense completes the words again, while I write them?
I already tried the IntelliSense-Settings in the C#-options, but these settings didn't change anything
There are 2 different autocomplete modus in Visual Studio, suggestion mode has the behavior you describe. Suggestion and standard, explained here. Press CTRL-ATL-SPACE to toggle between these modes.
You likely inadvertently used the keyboard shortcut to toggle completion mode. You can correct it with the same shortcut or in the menu it's Edit -> InteliSense -> Toggle Completion Mode
To change InteliSense from Suggestion mode to Completion mode in VS 2019
In my experience, "Toggle Completion Mode" name changed into
Edit -> InteliSense -> "Switch between automatic and tab-only Intellisense completion"

Prevent Visual Studio from switching tabs to show me warnings

I'm using Visual Studio Community for Mac (2017), which is different from the one on Windows (it's a "rebranded version of MonoDevelop"). Specifically, I'm using it to write ASP.NET, C#, JS, and CSS but I think the warnings are only for C# code.
Every time I run my code, I am taken from the tab I was just in to another tab where I have a warning. I find this switching extremely disorienting, so I need it to stop.
I don't need or want to fix the problem causing the warning right now. I know I can go to "Options" > "Compiler", then set "Warnings level" to 0, but I don't want to not see a list of the warnings I have.
How can I prevent it from switching my current tab around?
After suffering with this for too long, I finally figured out the solution.
Simply check the checkbox next to the error in the list (in the "error pad"):
It will be shown (at least at first) in strikethrough and it won't steal your tab focus anymore (unless you uncheck it).
You can either do this for every warning or you can go to Preferences (shortcut: command + comma) and set a setting so that they automatically get checked off. The setting is "Build" > "Jump to first error or warning" and I set it to "Error" since I like being taken to any problem that prevents things from compiling. If you want it to never steal your tab focus, you should set it to "Never".

Cannot edit after using 'Break All', although break points work fine

This seems to be a WPF-specific issue.
If I set a breakpoint in the code, the program will pause when it reaches that line, and I can edit/add/remove code, and then continue - it runs the newly edited code (ie, it behaves as expected).
However, if I hit 'Break All', I get moved to window that says "Your App has entered a Break State...". If I try to edit my code, nothing happens. I try to type but nothing happens - no text appears, and there's no errors that pop up or anything.
I don't have this problem in WinForms applications - just WPF. If I create a basic WPF project from the template, I still have the issue.
It's a very frustrating issue! My ugly hacked solution is to add a button to my program's UI called 'Break', which executes a single line of code that has a breakpoint on it, basically recreating the behaviour that 'Break All' should have.
Weirdly, it's not an issue if I'm on a WPF project which uses multiple threads. Hitting 'Break All' in this case acts as if there's a breakpoint on the line of code where the background thread is set up.
I am not sure..but you can give a try.
To enable/disable Edit and Continue. In the Options dialog box, expand the Debugging node, and select Edit and Continue. In the Options dialog box Edit and Continue page, select or clear the Enable Edit and Continue check box. The setting takes effect when you restart the debugging session
source:https://msdn.microsoft.com/en-us/library/ms164926.aspx

Resharper inserts wrong template

I don't understand why resharper Alt + Insert inserts not class, but it's template instead.
Any ideas, why?
I suspect that there is an exception being thrown while it is being inserted and it fails to finish expanding the template. Can you run VS with devenv.exe /ReSharper.Internal and try again, please? Keep an eye out for a small popup in the bottom right of the window with details about an exception.
If ReSharper doesn't work for one solution, try to clean Resharper caches:
https://resharper-support.jetbrains.com/hc/en-us/articles/206546989-ReSharper-stopped-working-for-a-single-specific-solution
I think the shortcut Alt + Ins is assigned to wrong command. Follow below steps and verify whether the keyboard shortcut is correct. Otherwise assign Alt+Ins to correct command.
-On the main menu, choose Tools | Options. Expand the Environment
node, then click Keyboard.

Debugging Silverlight in Visual Studio 2010

I have an MVC application which uses a silverlight control.
Somewhere along the line something is happening in the silverlight cs code that isn't right. I've inserted break points in the CS silverlight code to get a better idea of what's happening, but for some reason I just can't step through the code.
I know code is being hit, but it's just not showing me in the debugger.
I thought it might be because I was using Chrome as the default browser but I changed this to Internet Explorer and still no joy.
I realize this is a very vague question, but has anyone else experience anything similar, and if so, how did you get around it?
Any help would be appreciated,
Thanks.
Be sure to set the Silverlight Debugging checkbox on the project properties Web tab
If Chrome is your default browser and your breakpoint tooltip shows this message:
"The breakpoint will not currently be hit. No symbols have been loaded for this document"
... then it is possible the debugger attached to the wrong Chrome process at debug startup. A work-around is:
Start debugging your Silverlight app. Your app should be running in Chrome.
From the Debug menu, select Attach to Process...
Scroll through the available processes and locate the chrome.exe process that shows the type as 'Silverlight x86'.
Select that process and click Attach.
I had firefox as my default browser and nothing was being hit(I even tried attaching to a process). What finally worked for me was setting IE as the default.
Silverlight break points are now being hit for me! :)
Right Click on Web.UI project in solution. go to Web , check Debuggers --> Silverlight save and Debug..
Make sure you have silverlight developer installed.
Your code may be part of a class marked with the System.Diagnostics.DebuggerStepThroughAttribute. This happens with auto generated classes (like with Add Service Reference). If you are extending a partial class, other parts of the class definition may have that attribute.
Try unckecking the Options / Debugging / General / Enable Just My Code checkbox.
Otherwise put your mouse over the red dot in the source code window, which becomes an empty circle if the debugger disabled it, a tooltip will give you additional information.

Categories