I am working on a small web api project in Visual Studio 2013 Ultimate. Windows 2013. Internet Explorer 9. When I run (debug) from VS using the internal web server (I guess that is IIS Express, now), I am finding that the changes I am making (and saving) to a javascript page are being ignored. Placing a breakpoint in the javascript shows the older code without my changes.
CTRL+F5 does not force the application to use the currently updated page. Checking the page in, then checking it back out often works. Is there some setting or trick that will help me out here?
Clearing the cache history seemed a bit excessive and I don't want to do that all the time.
The following solution worked me in Internet Explorer:
First enable script debugging:
Tools menu -> select Internet Options
On advance tab uncheck "Disable script debugging (Internet Explorer)"
Then make sure you get the newest page:
From the Tools menu choose Internet Options.
On the General tab, under Browsing history, click Settings.
Under "Check for newer versions of stored pages" make sure "Every time I visit the webpage" is selected.
Click the OK button.
If somebody has this problem and ctrl+F5, clearing browser's cache, restarting debugging, changing browser, changing web.config and rebuilding project don't help, then there is one last thing that works (at least for me): restart Visual Studio.
Also changing debugging port on local IIS Express helps but this is far more painful if working in a team or using Azure Active Directory etc.
Only solution that worked for me was changing the javascript file name and updating the bundle configuration to point at the new file. I tried everything else from restarting my pc, deleting bin/obj/cache/etc, CTRL F5, restart IIS, and so on.
If I'm correct you should build (ctrl+shift+b) your project before debugging. This web server runs in the background on a port of choosing whenever you start in debug mode. You can close the task(s) (process bar next to your clock) if you need a new session or press F5 in VS.
You can avoid using the built in web server if you have IIS (Express) or something similar.
Go to RUN and type iis depending on your OS it's already installed. Otherwise try to install it in Control Panel > Programs or Features > Turn windows features on or off
add a website (site name, path, hostname)
add to your host file 127.0.0.1 hostname (c:\windows\system32\drivers\etc\hosts)
To debug your project in Visual Studio:
open your website on your hostname in your favourite browser
click on DEBUG
click on ATTACH TO PROCESS
find w3wp.exe
hit ctrl+f5 in your browser to start debugging server code
Depending on how your solution/project is setup, you can publish your project files directly to IIS if you choose to publish to File System. Right mouse click on your project and choose publish. Set it up from there.
If your Visual Studio is up-to-date you can publish single files with alt+$+p.
Hope it helps.
Locate the code section where the JavaScript file is loaded to the page and add a parameter string to the end for testing. For example:
Change src="../Resources/js/MyScriptFile.js"
To src="../Resources/js/MyScriptFile.js?v=23"
Every time you update your JavaScript file, you change the version number. This will force the browser to load your new version of JavaScript file. After you finished testing, You can remove the string "?v=23". The bonus, if you leave it there, the end user will not be required to refresh his/her browser cache after you deployed your code to production.
I keep getting this problem very often. Normally what I do is first get into the drive where the OS is installed (In my case C:), and delete all the application.dll and application.pdb (it is stored in Windows\Microsoft.net\Framework\vx.x.xxxxx\Temporary ASP.NET Files). Delete application.dll and application.pdb in the users\xxx. Get into the application directory and again delete application.dll and application.pdb. Clear the browser cache. Restart the system (cold restart). Build the application. Most of time found to be working.
Note: I use DOS prompt for deleting since I'm quite used to it. But the user should have admin privileges. It's not a perfect solution but it works.
What worked for me was
Shutdown Visual Studio 2013 update 2 (I have win 8.1 all 64 bit)
Delete clear out "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files"
Cleaned and Rebuilt solution
Restart IIS Express. If using IIS just re start app and pool.
Run in VS 2013 Debug (F5) it still loads the old file under Script Documents > Windows Internet Explorer > Page_Name.aspx
Then F12 Developer tools clear Browser Cache (IE), I have the same issue in Chrome
F5 in browser reload the page finally loads the changed JS script file with my debugger; entry and breakpoints set
So i had the same problem and i could avoid this by canceling the .ASP.NET-Server
.ASP.NET-Server from Visual Studio for debugging
from Visual Studio and restarting the debugging. Hope this helps someone.
I restarted Visual Studio and rebuilt the project, but the problem persisted for me -- the debugger continued to run an old copy of the .js file. The solution for me was to simply reboot the machine. (When all else fails...)
For reference, I'm currently using Visual Studio 2015.
Related
I am working on Spring MVC framework with Eclipse and Angular JS for FrontEnd Data Binding, I use Tomcat Server for Running the Project.
Project is running Properly, but when i open any JSP or JavaScript file to make changes and made the Changes then i refresh the browser the changes are not getting reflected on browser
I opened the file with Eclipse Default Editor as well as Sublime Text
Sometimes changes are getting reflected only after clearing browser cache, and sometimes after restarting tomcat server.
Sometimes i do both of these.
I have also tried chrome cache killer plugin and chrome dev tools -> disable cache and incognito window
Sometimes situation comes like even after restarting server and clearing browser cache code changes not reflecting on browser.
It makes development process much slower.
please suggest something which can solve this issue and can make development faster.
When i changed the code in file which is opened in Sublime Text then its not reflecting in browser
After changing the file i have refreshed the eclipse project and cleaned browser cache and it started working.
I am not 100% sure but its working for me
Try rebuilding the application every time and then Ctrl+f5 to do a hard refresh.
I have a web page from which i am creating activeX object and calling some methods in it.I have created msi file to register actveX dll. It works fine on my local machine but when i try it on other machines,it does not work. I have also installed the msi file on other machines and enabled "Initialize and script ActiveX Controls not marked as safe for scripting" in IE but still it does not work on other machines.
What is going wrong?
Thanks
Check after you run the .msi that your ActiveX.dll is registered properly. You should see it in IE 10 under I believe "Tools" (gear icon) - "Manage Add-ons". It should be listed there, make sure you set the Show dropdown list to "All add-ons". If you don't see your ActiveX listed there, something went wrong with registering the ActiveX.
You'll want to troubleshoot your .msi at that point, run it with verbose logging turned on.
msiexec /i MyActiveXInstaller.msi /l*vx "C:\Somepath\ErrorLog.log"
I'm doing some changes in Java script and my application is running in oracle weblogic version 10.3.2. Suppose if I do some changes in the java script in the application deployment area the updated js file is not getting loaded in my laptop. I tried everything clearing the cache using IE options, deleting the files from the folder, Used all the options for clearing cache using the develper tools, I also selected always refresh from server option in the developer tools, restarted my laptop but still the updated javascript file is not getting loaded.
In the server side I also tried re-starting the application and the entire server.
It would be of great help if someone can help on this.
The only way that I'm testing this is by deploying the same application with a different name which is very tedious. I'm sure that this is a problem with IE in my laptop since the browser cache is getting refreshed in other machines here.
Thanks & Regards
Arvind V
I have seen several posts that talk about remote debugging of javascript code on Android, but they all miss the point of what I am trying to do.
I have a Nexus 7 and I want to use it as a remote development environment when I am away from my desktop. I have created a chrooted debian distribution to run apache and php and git (via ssh). This chrooted environment mounts a subdirectory of the /sdcard directory from outside the chroot environement. Apache document root of a virtual host is pointing at a directory within this. Before leaving the desktop I can git push the latest release to the tablet. When I return git pull can get what I have done back again.
I then (when away from home and NOT connected to any network) can edit the code using an Android editor (using the 920 text editor), but then run the browser to look at what I have developed using localhost the apache virtual host picks this up and displays it.
The application I am developing IS NOT FOR ANDROID - it is ultimately for the desktop. But I want to be able to debug it like I was on the desktop. Breakpoints and single stepping are the prime thing, but also I tend to use the html section in firebug to adjust my CSS before editing it.
Is there a way to get either the chrome developer tools or firebug add on for firefox to load into a browser that will run in android?
I use Firebug lite bookmarklet for iPhone and iPad, never tried on Android, check this out http://martinkool.com/post/13629963755/firebug-on-ipad-and-iphone it must be similar on Android.
To activate it use this steps:
Create a new bookmark or bookmark a page
Rename the bookmark to “Firebug”
Copy the textarea link:
javascript:(function(F,i,r,e,b,u,g,L,I,T,E){if(F.getElementById(b))return;E=F[i+'NS']&&F.documentElement.namespaceURI;E=E?Fi+'NS':Fi;Er;Er;Er;(Fe[0]||Fe[0]).appendChild(E);E=new%20Image;Er;})(document,'createElement','setAttribute','getElementsByTagName','FirebugLite','4','firebug-lite.js','releases/lite/latest/skin/xp/sprite.png','https://getfirebug.com/','#startOpened');
Edit the Firebug bookmarklet, remove the URL and paste the
bookmarklet
Choose “Done” (on the virtual keyboard) and you’re all set
Hitting that bookmarklet should give you a fully functioning Firebug at the bottom of your mobile device.
At least not for Firefox Mobile, because all the devtools are still partially based on XUL, where the Firefox Mobile is using Native UI.
I don't think there is any plan in the close future to change this situation; it's not a common scenario.
However, you should be able to do something using the Debugger API, creating an add-on for Firefox Mobile. But I don't know if it's worthy.
Is it possible to remote debug script code with Visual Studio 2010?
I have a JavaScript issue which occurs only on IE6/IE7. I’m developing on Windows 7 (64-bit) so can only install IE6 and 7 as Virtual Machines.
I’ve setup remote debugging between my development machine and the Virtual Machine and can successfully attach to the IEXPLORE process but I cannot debug it as Script code.
In VS2010 from Debug | Attach to Process, when I try to Attach to the IEXPLORE process on the remote machine VS2010 listed it as x86 type (Script is not displayed). And when I press Select to select the Code Type the choices do NOT include the script option (only, Managed, Native, Silverlight, T-SQL, Workflow).
Thus, although the debugger is attached to the remote process, it is not debugging the script so my breakpoints do not hit.
I have enabled debugging in Internet Explorer on the Virtual Machine.
This page http://msdn.microsoft.com/en-us/library/bb385613.aspx suggests that remote debugging of Script code is possible. However I cannot get it up and running. Any ideas would be greatly appreciated.
Check out this project, which lets you run IE6, 7, 8, etc together:
http://www.my-debugbar.com/wiki/IETester/HomePage
It's not 100% perfect, but it's always worked for my purposes.
Here's a trick that works with Visual Web Developer Express.
Open a local page in VS and start to debug it(or hit F5)
IE should popup and open this page.
Type in IE's address bar the url of the remote site.
Go to VS and you should see now a list of remote files in the Solution Explorer pane
Put a breakpoint in a remote file, where you want to stop it.
And refresh the page in IE.
You should hit the breakpoint.
I had this problem until I discovered that script debugging was disabled in IE on the remote machine. I re-enabled it using this work around and "script" now appeared in the "Type" column when attaching to process on the remote machine.