Unable to debug aspx page - asp.net

Everything worked normally untill yesterday. Today morning when I tried to debug java script function (in aspx), it is not hitting the debug points...
I thought debug thing is not working ..so to test I added debug points in code behind file..it is firing them..the only problem is with aspx page..
I tried the following:
Clean solution Re-Build..
close and re open visual studio..
Restart my machine..
iisreset
I am confused what might be the reason..Can anybody please help me out?

I had the same problem recently and this checklist helped me solve my issue:
Some ideas.
Make sure it's a debug build and not release
Turn off optimizations in your project properties if they are on
Try inserting Debugger.Break() in your code instead of a breakpoint in VS
Make sure breakpoints are enabled (Debug->Windows->Breakpoints toolbar), and breakpoint symbol should be solid red circle, not a red outline of a circle
Execute your application. Load Debug->Window->Modules window. Check your assembly to see if symbols are loaded. It may give a relevant status message if not.
Have you been adjusting the date on your computer at all? This can really screw up a build process. If so, delete all your obj/bin folders manually and recompile.
This was copied from the an answer found in this post:
VS2012 Breakpoints are not getting hit
There are many other helpful suggestions there as well, im sure one of them should work!

In your aspx, find the tag <script runat="server">.....abx xyz... </script> then delete the content of this tag.

Related

visual studio 2015 could not find any controls on the page in code

I just inherited a project from a former colleague which was written in Visual Studio 2015 Community.
I am using 2015 Professional.
After I open his project, I see lots of errors reporting:
Severity Code Description Project File Line Suppression State
Error BC30451 'GridView_COMPANYINFO' is not declared. It may be
inaccessible due to its protection
level. CorporateActions C:\TTDAS\HJ\Projects\CorporateActions_Product\RecoveryTool_20160330\Demo_HoldingsList.aspx.vb 187 Active
In code file, I also see this, no control is found in the dropdownlist:
His project is in UAT now so I know there shouldn't be code issue in it.
I kind of recall I had similar issue in VS2005 but in most cases the issue just disappeared without any change.
Can someone share me any idea on how to fix this?
This is really driving people nut.
Any clue is highly appreciated. Thank you in advance.
I did lots of googling and many accepted solutions actually scared me away by asking people to remove and reinstall VS, the issue was fixed quite simple:
For each page that has the error reported, add any control for example, a button, and then double click the button to go to code behind, by double clicking the button, VS will be able to find out the button in the code behind, more importantly, all the missing controls on the same page are automatically identified again. Once I did this on all the reported pages, the project is up and running again, all I need to do is to remove the extra buttons.
I hope this is helpful.

"External component has thrown an exception" on rebuild

I'm really hitting a wall over here.
I was making some changes to an existing web site project in VS2010 and everything was fine.
Sudently, i was unable to rebuild the solution. I can build and run it, with every change i made working. When i try to publish it, it gives the error "External component has thrown an exception" and gives no aditional information.
So, i started everything from zero and started to rebuild the solution after each change, to check where the problem was. The error is thrown when i add a new control (be it a text box) and then, in the code behind i try to set is value to something (like Me.TextBox1 = ""), although the textBox is correctly recognized.
Has someone experienced anything similar? I'm googling for 3 days and i just can't solve this really important issue.
Thanks in advance
EDIT:
I tried to delete all references and re-add them but nothing.
Other apps are working fine.
Is there any way that i can debug this error? i tried to check the events log, but found nothing.
Ok, i solved my problem.
The textboxes were inside a panel and for the new ones i had to declare a textbox and assign it to PanelName.FindControl(TextBoxName).
The already existent ones didn't need this.
Still don't know why it was working fine and suddently stopped working.

How to debug Backbone/Marionette

I am working on a task on asp.net and am idle on one aspx page, where it helps to increase/decrease the calendar cell, I just wanted to know the value of a variable by debugging so that , i will know what to change am new to marionette and need some help to get those values so that i can go ahead with this issue, am attaching the script.
i even searched many sites to debug the backbone, got chrome plugin to debug but of no help.
Add <%debugger%> at the top of your template. It will break an attached JavaScript debugger (such as Chrome's Dev Tools), when Underscore begins to populate the template.

ASP.NET: The breakpoint will not currently be hit. No symbols have been loaded for this document

I was having this issue for several days. I finally figured out a fix for ASP.NET programmers, and I figured I would share.
Problem
After setting a breakpoint, and then debugging my breakpoint would turn yellow with an exclamation point. When hovering over the breakpoint it would say "The breakpoint will not currently be hit. No symbols have been loaded for this document.”. I tried cleaning, rebuilding, changing various settings through my project and visual studio. Nothing worked.
Solution
I was digging around in the Solution settings. I noticed that under "Web" tab my Start Action setting was set to something other than "Current Page". After setting it back to current page everything worked out.
I hope this solves the issue for other's like me that were exhausted after trying every other suggestion/answer they could find on the internet.
The issue only happens to me on ASP.Net Projects
Right Click the Web Project
Select Property Pages
Start Options
Make sure Use current page is selected (as shown below)
This happens because your project still has errors, so run the last correct version.
Correct your mistakes, surely it is the error "CodeBehind" change it to "CodeFile" and surely the errors disappear, you can return project run without errors.

Flex builder error

My flex builder suddenly stopped highlighting compile time errors.
Its also not giving any code completion suggestion, even after pressing ctrl+Space.
What could be the possible reasons?
Regards,
PK
this happens sometimes and it seems for no reason. What may have occurred is you may have an error higher up inside your code of which the compiler has not picked up - This can happen, but when it does the clue is the suggestion stops working and any errors proceeding don't get highlighted.
Clean your project,
restart flex,
check to see if you have the same problem on an another project - you probably won't and this'll show you the clue you have an error in your code.
Be aware the error may not be in that file - it could be in an ajoining mxml file or superclass.

Resources