I'm having a really annoying problem with debugging javascript with VS2008.
If I simply press F5 (or choose 'start Debugging' from the Debug menu), the iexplore process is attached, but no breakpoints break in the scripts. The Script Documents tree doesn't even appear in the solution explorer.
I already know:
I can set a breakpoint in Javascript just fine. It does NOT show the "This point will not be hit" message.
Calling the debugger through using the 'debugger' keyword works fine, but attaching to the iexplore process doesn't since it gives a "process already attached to a debugger" message.
Using the manual 'Attach to process...' works just fine. The Script Documents appears as well.
The project has recently been converted to a Web Application from a WebSite.
I already tried:
Clearing the IE cache.
Shutting down VS2008, Stopping the IIS and deleting the temporary asp.NET files restarting both IIS and VS2008 afterwards.
Setting IE7 as the default browser both for windows and for VS2008.
Resetting my user settings for VS2008.
Checking that IE script debugging is enabled.
Nothing has worked so far. While Attaching to process isn't too taxing, it is very annoying when I'm used to just hitting F5.
If anyone can think of a solution, please please please (I'm begging here!) let me know!
Is silverlight debugging enabled on the website project properties? This will disable Javascript debugging.
Related
PgAdmin in the latest version (4.28) doesn't start anymore, hangs in the loading screen and shows JavaScript errors in the browser console. What can I do?
The solution is simple although I don't really know why it occurs from that version on:
Open the registry editor (Search for regedit.exe)
Run it as administrator
Navigate to Computer\HKEY_CLASSES_ROOT\.js
Adjust Content Type from text/plain to text/javascript
Restart pgAdmin and it should work again.
Maybe, you will have to clean your browser cache or restart your computer as well (Thanks to the Kassym and Bruce).
As already I said, I have no idea why or how this happens, maybe someone from the team can add this as a comment here and I will update my answer.
So I am having this really weird thing where my javascript doesn't show in my sources window. If I set a debugger in my js and then reload the page, it will break and I can see the javascript. The weird thing is that instead of the tab being labeled MyJavascriptFile.js it reads [VM](62) or some other number. I have tried reinstalling chrome and it didnt fix my problem. It didn't used to be like this, any ideas what is going on? Its just really annoying to have get to my javascript by adding debugger statements.
I'm having this problem right now. Must be a bug in Chrome. All you have to do is load the console (f12) then reload the page whilst the console is loaded. You can now see your code.
The weird thing is that instead of the tab being labeled MyJavascriptFile.js it reads VM or some other number.
This is because you are accessing your script through localhost, and therefore running into security policies. If you host your file at an IP or domain name, you'll be able to debug normally again.
I am developing a localhost project that keeps sending requests to your-mime-site.com.
I have included these jquery plugins:
jQuery
jQuery.form
jQuery.validate
jQuery.ui
Everything else I have coded myself.
I have tried to use NetBeans to search the project for the string "your-meme-site" but it says that some lines are too long to be searched.
Does anybody know why or how this is happening?
One thing I can think of is your PC / network has been infected by virus that alter the DNS entry such that request to any arbitrary site gets redirected to your-mime-site.com
On Windows DNS host file exists on C:\windows\system32\etc\hosts. On UNIX it's on /etc/hosts. Ensure you don't have your-mime-site.com entry there.
Try looking in the "Initiator" column in the "Network" tab of Chrome's inspector to find what's triggering it.
I disabled Garmin Communicator Plugin, BitCommet Video Player, Youtube Video Replay, and Java Console, the request went away.
I did reenable the Avast plugin and it is not the culprit, for anybody else who might get this problem.
I found my problem. It was an extension in Firefox. I started firefox in safe mode and the problem was gone. Then disabled plugins and extensions one at a time till I found out it was a download flash video extension I had installed. Uninstalled the extension and it is gone.
I'm working on developing a site on my local machine (Windows 7 Ultimate x64) using WAMP, running APACHE v2.2.22, PHP 5.3.13, and MySQL v5.5.24. I'm developing using Chrome v 22.0.1229.94. I've got quite a bit of javascript in the site, however, and Chrome is relentlessly blocking javascript from running on the page.
Clicking on the little 'blocked javascript on this page' icon in the address bar includes the dropdown that has "Always allow Javascript on Localhost" checked off, and I also have a JavaScript exception in Chrome's settings explicitly saying to always allow JavaScript on 'http://localhost'.
Cookies are being allowed, "Allow all sites to run JavaScript" is checked off, and I have no idea as to why Chrome is not allowing the JavaScript to run.
Overall, it's not imperative to the project that I figure out a fix as both IE9 and Firefox 16.1 are allowing JavaScript and I can utilize them. I am simply curious if there's anything I can do to fix this in Chrome, as I would like to continue developing in Chrome.
If you notice that JavaScript is only blocked when the console is open (as some are saying), chances are that you disabled JavaScript in the console settings.
Open the console.
Click the vertical ellipsis icon (or the gear icon on older versions) in the upper right and go to settings.
See if the "Disable JavaScript" checkbox is checked.
I have the same issue, but only when the console is open. When the console is closed, JavaScript loads fine on localhost. Makes it hard to debug things though....
I got around it by opening localhost in an incognito window.
You can give your local server a domain name, may be that would help.
Open C:\Windows\System32\drivers\etc\hosts in notepad
Edit that file add a new line at the end
127.0.0.1 mydomain.com
Save, now goto chrome and type in http://mydomain.com/ this should point to your local server.
Since you nolonger run on "localhost" may be chrome will let you pass.
Let's me know if that works. Good luck!
I'm having a real problem trying to attach the JavaScript debugger in VS2008 to a web project. The web app is an ASP.NET MVC project but I don't think that should matter.
I'm using jQuery and have a .js file loaded when the page loads and in this .js file I call $(document).ready(function() { ... } and do some stuff and this "works." When I set a breakpoint it becomes disabled when I run the project through Cassini with the message "The breakpoint will not currently be hit. No symbols have been loaded for this document."
This error message is somewhat confusing because this is a javascript file so I would expect it to have a symbols file that could be loaded. i.e. a .pdb file that you would need to debug server side code. Or am I missing something here?
I found this post here:
Using breakpoints to debug Javascript in IE and VS2008
but that didn't help.
I've also tried a few other recommendations which involved attaching the browser from the debug menu after starting the debug session and I've tried doing this on IE x86, IE x64, and Firefox. If I add "debugger;" to my code then it will break in Firefox and let me step through the code in the Firefox debugger but I can't get it to do this in VS2008.
I'm running Win7 x64 Ultimate with VS2008 and the project is ASP.NET MVC with jQuery.
Any ideas?
have you tried debug the js file alone(put a debugger in code) by adding it to a blank html page?? and check whether it ll throw a script breakpoint exception and allow you to attach to VS 2008??
Have you checked the "enable script debugging" option under tools (not sure what it's called, on a Mac right now) in IE?