Visual Studio 2013 debug not stepping in - asp.net

I am developing a web application on Visual Studio 2013. On older versions, whenever there is a bug in the web app, I moved from the browser to the visual studio to the line where the code is.
Now, whenever there is a bug, I just see it in the browser without being able to see it in the Visual Studio. As if the debugger is not able to step into my code.
This has been going on for all my web projects which makes me feel that it is a setting in VS but I am not able to locate it.
can anyone help?

I was able to find out what was wrong here.
it seems that for some reason, under Debug in the main menu and under Exceptions, nothing was checked! I checked ALL "Common Language Run-time Exceptions" and it worked for me.
However, you need to spend sometime there in the debugging list. If you enable ALL, you will get all sort of exceptions captured.

Related

Visual Studio 2019 and ASP.NET project not starting

I have an issue with VS 2019 and any ASP.NET application, they don't want to start. After hitting F5 there is no output in the Output window, Process Memory stops on 13 MB and that's all, no events, nothing. It was working fine and I'm having a problem investigating what's gone wrong that it stopped working.
I have checked that IIS Express is working fine, repaired VS twice, updated it, there are no errors in Event Log, restarted PC, reinstalled .NET Framework.
Running other types of applications like console works fine, no issues there.
The problem is that I can't find any piece of information that would help me to define what is wrong.
How can I troubleshoot more to find what is wrong?
I've had the same problem with my Blazor App, after a colleague of mine googled around a bit it seemed like there was some kind of bug in later versions of VS2019. I decided to switch to the 2022 preview and here it worked fine again.

Visual Studio 2015 Go To Definition for CSS class missing

When I right-click on a css class in an html file in Visual Studio 2015 Enterprise edition, i don't see the option to "Go To Definition". Nothing happens if I press F12 either. Intellisense works, but I have no easy way of finding where the class referenced is actually defined.
I've restarted VS, and also looked at a colleague's setup that works fine and can't see a difference. I know it's not the end of the world, but any help much appreciated.
Thanks.
There are a couple of solutions both 'Extensions and Updates' to Visual Studio:
Web Essentials by Mads Kristensen at Microsoft. This provides F12 'go to definition' and Alt+F12 for 'peek definition'.
Productivity Power Tools 2015 by Microsoft. Similar to the above providing Ctrl + Click to Peek Definition / Go To Definition.
My preference would be Web Essentials as I found one of the other power tools features 'Solution Error Visualizer' a bit buggy.
As to your colleague's set up hard to say. Out of the box visual studio sometimes installs web essentials by default.

Debugger For Visual Studio is not Working

I am facing a very serious issue with visual studio debugger. My asp.net application is hosted on local IIS server. Yesterday i was debugging my code suddenly it stopped working. I verified w3wp process. It was same as IIS process. Then i tried to download symbols but i am not sure either they are all that i need. I tried attaching debugger on visual studio 10 and visual studio 12. Neither of them is working in this case. I tried to attach debugger of JavaScript but it is also not working.
Please Help.
Are you building full debugging symbols? If not then the debugger has no information to relate the source code to the in memory activity under the debugger. This is set in the project properties per configuration.
Also ensure the symbols are in the bin folder.
You can validate that VS is loading the right symbols with the Debug | Modules window.
I cleared temporary cache of .NET Framework. then i again deployed my application on IIS with different name and magically everything started working.

Visual Studio 2015 - Opening two projects in debug mode

I'm using Visual Studio Ultimate 2015 CTP (Version 14.0.22512.0 DP), and create two asp.net 5 vnext web applications.
When one is running, and I'm starting the second one with the context menu "Debug->Start new instance" option, the IIS Express crashes instantly (Internet Explorer opens firstly the second project, and then instantly closes both, Chrome simply display only that the page doesn't exist).
The only trace that I found is in the Event Viewer, a Warning from IIS Express:
The directory specified for caching compressed content C:\Users\Alek\AppData\Local\Temp\iisexpress\IIS Temporary Compressed Files\Clr4IntegratedAppPool is invalid. Static compression is being disabled.
Any suggestions how to fix this? It's hard to work on a multi-tier project when only one project can be run at a time.
When I created manually above folder, nothing is logged to the event viewer, but the IIS Express still crashes. On Visual Studio 2013 I can run two instances of two Web Applications withtout any problems
It should work if you set your solution to use multiple startup projects and add all the projects you need to debug
Really easy steps to follow here:
http://www.magnetismsolutions.com/blog/paulnieuwelaar/2015/04/07/debug-multiple-projects-at-the-same-time-in-visual-studio
Still not as easy as previous versions of visual studio
Maybe not a solution, but a workaround which I found - running two instances of Visual Studio 2015 allow to run two projects.

Visual Studio 2012 Error

I use Visual Studio 2012 on a Windows 8 PC. I had no problems when installing VS2012.
When I'm working on a ASP.NET c# project I usually use the option "See in the explorer" instead debug the project. This gives me the ability to change code behind.
Sometimes after build and press F5 to reload the page I get some errors. This doesn't happend always, but very often.
The errors are: CS2021, CVT1100, CS1566...
"Can't find file 'C:\Users\UserName\AppData\Local\Temp\Temporary ASP.NET Files\root\617be439\61539075\App_GlobalResources.iuxkzxdi.0.cs'"
Always the "C:\Users\UserName\AppData\Local\Temp\Temporary ASP.NET Files\root" is the problem. Sometimes it says can't find file others it says access denied.
Visual Studio works but is horrible to keep pressing F5 until the error goes away.
Can anyone help me?
Run VS2012 as Administrator. Local account by default have restriction accessing the build/temporary locations and will throw such errors. You'll have similar problems when trying to publish websites.
Therefore, It is easier to set VS 2012 once, and check the box in properties to "Run program as administrator" to allow it run always as "Administrator".

Resources