Skip debug points - visual studio - visual-studio

I have a asp.net application. Some times I need to put many breakpoints. I know usage of F5, F10, F11 to navigate between line of code. If I want to bypass all the breakpoints for time being but want to keep all breakpoints alive for future, how can I do this?

Use Debug->Windows->Breakpoints window, you may disable (by using checkbox) or delete any/all breakpoints from there. You may also configure custom VS shortcut for this VS 2012 Add Shortcuts for "Disable all breakpoints" and "Enable all breakpoints"?.
Alternatively if you use local IIS you may run application without debugger attached, then if you want to start debugging use Debug->Attach to, select w3p.exe and start debugging (I use this setup often).

Related

Visual Studio Breakpoint, click to disable, not to delete

By default, Visual Studio 2012, and others possibly, deletes an enabled breakpoint upon clicking it. This to me feels unnatural because clicking a disabled breakpoint enables it. Why then would a subsequent click delete it? I would expect the opposite, which is disabling the breakpoint, similar behaviour to Xcode.
Is there a setting somewhere that allows me to modify this behaviour, to clicking to toggle between enabled and disabled?
i don't know about a setting to change the single click behavior, but a little experimenting revealed that shift clicking the breakpoint disables instead of deletes it. this is in visual studio 2019. i found your question because i was wondering the same thing.

Visual Studio 2013 Debug keyboard shortcuts are not working

I just got a new computer with Windows 8 and installed Visual Studio 2013 on it and now I have an issue with debugger shortcuts - I run application in a debug mode and it breaks at the first break point but when I try going further line by line, F10 does not work from the keyboard - only VS Debug menu. Anything I am missing?
P.S. The issue was the function key. It needs to be turned on in order to use F keys
On Lenovo laptops, there is a shortcut to disable the Fn key automatically running the default Windows shortcuts.
Hit the Fn key and the Esc key at the same time to toggle the "Hot Key" default.
Hope this works for other Laptop brands since this is an easy shortcut for newer Lenovo laptops.
Please follow the instruction here, though it talks about visual studio 2010 it should help you to analyze the problem. it may be solved with the steps described there and if not, please let me know...
Why does F10 (step over) in Visual Studio 2010 not work?
Update Adding the answer from the source in case the link will be removed:
In the Options.Keyboard page, please select "Debug.StepOver" from the command listbox, and then put focus to the "Press shortcut keys" textbox and press F10, click Assign button to re-assign shortcut, does it work?
You can also try to run Visual Studio under safe mode, which will
prevents all third-party VSPackages from loading when Visual Studio
starts; if the issue disappear under safe mode, you may consider
checking your installed add-ons or VSPackages.
Second, to log all activity of Visual Studio to a log file for further
troubleshooting, please use the /Log switch, and post the log file
content here, so we can do more investigation on it.
If this feature works well before, and suddenly behave abnormally, it
usually indicate that some files or configurations of Visual Studio
installation is corrupted or missed, you can:
Restores Visual Studio default settings by using "Devenv.exe
/ResetSettings" command. Please backup your settings before restore to
default settings.
Repair/reinstall Visual Studio;
To repair Visual Studio In the Add or Remove Programs dialog box,
select Visual Studio then click Change/Remove.
I resolved my issue and wanted to post an answer in case anyone is looking for it. Enabling function key does not require any complicated solution, it can be enabled by changing settings in:
Control Panel -> Hardware and Sound (Category) -> Windows Mobility Center -> Adjust Commonly Used Mobility Settings
Look Under Function Key Behavior and change the dropdown value to "Function Key" to enable Fn key.
To disable it, select "Multimedia Key" 
See: http://elena-sqldba.blogspot.com/2015/05/how-to-enable-function-key-on-windows.html
Also check 3rd party software. In my case I had Camtasia Recorder open and minimized, which apparently intercepts the F10 input (thanks, TechSmith)
I had the same problem. My solution was a bit different and can apply to any key. My F10 key was not working. After unplugging the keyboard and plugging it back in did not fix the problem, I twisted the keyboard like an ice cube tray and the F10 key started working again.

Express version missing Debug-> exceptions menu

I use. VS 2013 Express
When debugging, I need to stop automatically on exceptions.
try to follow this.
http://msdn.microsoft.com/en-us/library/d14azbfh.aspx#AddExceptionsCommand
It says I need to add Exceptions command to the Debug menu
On the Tools menu, click Customize.
The Customize dialog box appears.
Click the Commands tab and, in the Menu bar list, click Debug.
Click Add Command.
In Categories in the Add Command dialog box, click Debug.
In Commands, click Exceptions and then click OK.
But in stage 6, in Commands there is no Exeptions
Also I tried to remove Enable just my code, And it didn't work.
Just a FYI ---
Im am using VS Express 2010 (VB) and didn't see the debug exceptions.
Based on the screen shot above I just pushed CRLT-ALT-E and it opened.. (!)
Its a bit unclear to me, if VB 2010 Express has this option or not, or how to unhide it, but the key click combo opened it.
I was then able to turn off the option I needed
In my case the "PInvokeStackImbalance"
enter image description here
Another user has reported the missing 'exceptions' on the 'debug' menu to Microsoft and actually got an acknowlegement from Microsoft (though not from the product team and not confirmation that it is a bug).
https://connect.microsoft.com/VisualStudio/feedback/details/882780/exceptions-comman-missing-in-vs-2013-express-for-web
For what it's worth, you can add your vote to this report at that site; I'm experiencing this problem and I have done so too.
Here's a potential work-around: the 'exceptions' is present in the Visual Studio Express for Desktop. And you can install that edition side-by-side with Web edition. If you can figure out a way to invoke your project executable from the debugger in the Desktop edition, you'd have control over exceptions there.
The exceptions menu isn't shown in Visual Studio Web Developer Express. It is only shown in Visual C# Express.
You can however break on all exceptions. You can try to turn off "Just My Code" debugging, which will catch exceptions thrown in CLR code and linked libraries.
To do this, open Tools -> Options -> Debugging -> General, and uncheck "Just My Code" (or Enable Just My Code).
if it doesn't work try
Debug -> Exceptions -> Common Language Runtime Exceptions - check "when thrown"
if you don't see exceptions try to change your settings following this guide
Refer here for documentation.
update
if it still not working try this
Tools menu >> Import and Export Settings >> Reset all settings. Then choose C# Development Environment.
Many of the customization and integration features for Visual Studio's IDE are not available in the free Express editions, but you should be able to get to the Exceptions menu easily enough without using them.
Press F5 to start debugging, then select Debug / Exceptions... Turn on the check box for "C++ Exceptions" "Thrown". Hit "OK"

How to prevent stopping IIS in VS 2013?

I'm using VS 2013 preview for web development.
When I click F5, the website is running. But when I press stop button in VS, it shuts down IIS server (in VS 2012 everything's fine). It's a huge inconvenience, cos every time you place minor changes to markup or whatever you have to press F5 instead of just click "Ctrl+S" and refresh the browser.
This seems to be due to the Enable edit and continue option being checked by default in the Project Properties > Web > Debuggers section. Disabling it has solved the problem for me.
I have exactly the setup you are talking about. In order to do this, you can set up your project as follows:
In your Project Properties, Select the Web tab
Change the Start Action to "Don't open a page"
Now you can start your application using CTRL + F5 (start without debugging) to launch your application and use it without the debugger running. If you want the debugger, you can still hit F5 to start it up, but stopping debugging doesn't shut down the instance. It's great for making HTML changes in particular.
That said, I don't have "Enable Edit and Continue" checked either, as per Xaviers answer.

Can I disable "debug view" in Visual Studio 2010?

Visual Studio 2010 switches to "debug view" when i click 'start debugging' - much like Eclipse does.
Can i disable this feature - if so how?
My machine doesn't perform very well - therefore the feature is irritating.
Besides with two monitors i don't need it.
Ctrl-F5 starts without debugging.
That's not what I meant, I would like to debug without the "debug view", i.e. without changing the layout of all windows.
You can change the layout of the windows in debug mode, but unfortunately, you cannot turn off the transition from "coding mode" to "debug mode". Your layout is persisted between debugging sessions, though, so any changes you make will remain.
Just click on Debug/Start without debugging from the menu or Ctrl-F5.
Just Press Control-F5

Resources