How to debug Backbone/Marionette - asp.net

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.

Related

Google Optimize: Unable to preview experience. Please make sure to enable cookies and restart the browser

I can't preview my Google Optimize experience. Google optimize throws below error:
This happens to me quite often too. The suggestion Google gives is wrong. Clearing cookies and restarting the browser does not fix it. Sometimes rebooting does, but that's a huge disruption.
What I found to work pretty reliably is to end the preview (dropdown), then click the EDIT button to go to the editor. Come back to the setup page, then try Debug again. Debugger should work again.
This is how it worked for me:
In Chrome go to Clear Browsing Data (chrome://settings/clearBrowserData).
Make sure you select checkboxes Cookies and Cached images and files.
Submit the form by hitting the button "Clear data".
Go to preview experience.
For me it started working when I gave the Google Optimize plugin access to all pages (not just the page running the experience).
I think I've found a fix for this. Go to the top right corner of chrome (the three dots) Settings > Privacy & Security > Cookies & other data > and add the url in the bottom section called "sites that can always use cookies"
Example
There can be multiple reasons.
Most obvious: enabled cookies like mentioned by others. should help
If it does not work even when cookies are enabled and you have restarted the browser then more chances are that the issue is in the Experience/Test that you are trying to preview. This can be due to:
A preview is already running in another tab. Turn off preview
2.You have set the experience to run on certain URL patterns and you are trying to preview on a page that does not qualify the criteria.
You have set some Audience rules which are not being met fully. For example: You have set the Audience Device type to mobile and you are trying to preview on a Desktop. Although Optimize will load the preview in a mobile mode but it will not be able to run the experience properly.
In my case the issue was due to wrong device type. I hope it helps.
It's also possible to get this "Unable to preview experience. Please make sure to enable cookies and restart the browser" error message if the content you're trying to modify doesn't exist when Optimize tries to modify it.
I had Optimize set to modify on page load, but the page I was working with was a form, where the text I wanted to modify didn't exist until I clicked through to the second step of the form (still on the same URL).
I was able to just run the study instead on another similar page that had all the text loaded at the start. I'd guess that setting Optimize to trigger from a custom event triggered upon loading the second step of the form instead of "on page load" would also have resolved the issue.
If you are using chrome then:
Click the context menu in the browser toolbar to the right of the
address bar.
Choose Settings.
Select/Search the "Security and Privacy" section.
Choose "Cookies and Other Site Data" Ensure that "Allow all cookies" is selected.

Concrete5: Why does my block fail to save the first time?

I am using 5.6.3.4 and using Designer Content to create blocks. I have customised the blocks by adding tabs. Other than that, it's pretty straightforward and everything is functioning well.
My problem is when I try to add and save a new block the first time, it keeps showing me the 'loading' icon but does not save the block. If I refresh the page and try adding the block again, it works. Sometimes it happens randomly and when I refresh the page and save, it works. Is there anything that's causing this and how can I fix this?
I have all cache turned off and am trying this on my localhost. The site does not have any other add-ons installed other than Designer Content. The site is using Bootstrap.
Had same issue, which was caused by tracking pixel code(javascript error).
Changed script to display code only when page is not in edit mode

Unable to debug aspx page

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.

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.

ASP.Net FileUpload control causes google chrome to crash and show broken data

I am working on an asp.net page that contains a fileupload server control (not async fileupload).
I recently noticed that whenever that control is on the page and any postback occurs, the page crashes and stops executing..giving me strange and broken data like in the screenshot attached!!
I also noticed that is happening in any webkit based browser (e.g safari, chrome, etc..)
Strangely, the problem is only occurring when am running this page online, but when am debugging it locally, this problem doesn't occur!!
Any ideas??
Note: The following link [ http://i.stack.imgur.com/lpe24.png ] is a screen of how the crash looks like, and i remember something now, i used to get this screen sometimes while am browsing through google.com or images.google.com !! hope this helps :S
Turns out this whole problem was caused by the compression module referenced in the web.config file.
As a permanent solution however, I changed all FileUpload controls to AsyncFileUpload, gaining both a solution and an easier way to navigate and work.
Thanks everyone ;)

Resources