Webstorm debugging with Chrome? - debugging

I am unable to debug at al in Chrome. I set it as my default broswer but when I try to debug, I see Connecting to 127.0.0.1:7930 in the Debugger window, but nothing happens (Chrome doesn't popup or anything). I have no idea how to trouble shoot this....any ideas?

If you are not familiar with, and believe me its worth checking out...another alternative is to use the Chrome developer Tools Built into the browser
You can debug javascript (add breakpoints and step into over, view variables), edit css and see your modifications in real time and save changes back to your file system. It also has a revision history for changes you make and you can revert back to any version! You can use use these Chrome developer tools in conjunction with the free Netbeans IDE where you can create your HTML, CSS & Javascript which has excellent code hinting / completion with Jquery support. You also add plugins to add more functionality.

Well I could not figure out how the heck to get Webstorm to debug with Chrome and their support is extremely limited. So as a workaround and what may be better because its free , is use Eclipse with Chrome Developer tools.
You are able to debug all the JavaScript files on your server and set breakpoints. I haven't stepped through while debugging, but this seems very promising. You could use Eclipse as well for the development of your corresponding HTML and css files or use in conjunction with Netbeans which is also free. Very straightforward if you are familiar with Eclipse already:
Eclipse with Chrome Developer Tools

Related

firefox error in eclips during compile of html5

hi last day i installed a ajax tool in my eclipse for js and html page editor and to debug them, but unfortunately it stop working, my project doesn't show any output and before i installed ajax tool output was executed in chrome and now it opens in Firefox please can anyone help me thanks in advance
Are you sure your installation was proper , Make a proper installation including mozilla features :-
1) Press Help -> Install New Software...
2) Tell Eclipse the source of Mozilla features. Mozilla features provides pieces to embed standard Mozilla browser inside Eclipse.
In "Work with" field, paste following URL and press Enter: http://beta.zend.com/studio-eclipse/updates-extra/9_0 .
This repository will be needed later, so don't select anything from here for now.
3) Install Ajax Tools Framework. They integrate Mozilla browser with Eclipse frameworks to let you inspect, analyze and debug extra information, that is not available in typical Mozilla-based browsers.
In "Work with" field, paste following URL and press Enter: http://download.eclipse.org/tools/atf/updates/0.3.0
After a second, you should see available software.
Choose all items.
Make sure that option "Contact all update sites..." is checked.
Press "Next" and "Finish" and wait until Eclipse downloads and installs all selected items. You will be asked to restart Eclipse.
4)After restarting, to start working with your new software, switch to Web Browser Tools perspective
To uninstall the current software extension or plugin from eclipse refer this :-
http://wiki.eclipse.org/FAQ_How_do_I_remove_a_plug-in%3F

Visual Studio Express 2012 Web debug randomly not refreshing browser cache with changes

Been using Visual Studio Express 2012 Web for a few weeks now learning JavaScript, HTML5 and CSS for a web based application. As a .NET developer its great to have the familiarity of VS (although better JS/HTML intellisense would be nice) and my progress is good, however there is an annoying VS quirk during debugging that I can't resolve. Occasionally VS (or perhaps more specifically IE10) will stop recognizing any code changes and run the previous version of the code. This is annoying but I can get around it by hitting an extra F5 when IE10 launches but it shouldn't be needed. I assume the file cache for IIS express is not being refreshed when the source is updated but I could be wrong. After a while of experiencing this problem I have not been able to pick up a pattern to understand what usage pattern causes the problem.
Has anyone else seen this? Any fixes? Searching the net draws a blank.
I use VS web site project types and have a vanilla installation of VS 2012 express (uses IIS express) on Windows 8 and debugging with IE10.
Thanks.
Has any web developer using visual studio web found a way around this? I found Chrome to be more reliable at ensuring the cache is refreshed when the code changes however with the IE & VS integration its easier to develop with IE.
This must be a common problem? I have tried IIS Express as well and the same issue (figures as I'm sure its a problem with the browser cache). Typically the problem occurs when running IE for the first time, and if there is a bug in my Javascript code that breaks the execution before the screen is painted its quite a pain as its not as easy to clear the cache manually. The only workaround I have is use F12 and 'clear browser cache for this domain' then F5 to refresh. Workable but annoying.
Any tips to resolve this would be appreciated
Add this:
window.applicationCache.addEventListener('updateready', function (e)
{
if (window.applicationCache.status == window.applicationCache.UPDATEREADY)
{
window.applicationCache.swapCache();
if (confirm('A new version of this site is available. Load it?'))
window.location.reload();
}
}, false);
I found this solution somwhere in the Net. Sorry, but I don't remember the author. It works for me when I debug Web App with JavaScript in Visual Studio 2012 using IE.
Please, stop cursing Microsoft. We all use their pruducts, be fair.
I don't work at Microsoft but I would be unhappy without its products. I think all of us would.
I am using Chrome myself, but still experienced the same problem. In the end I settled on the solution of completely turning caching OFF on my local WebServer - being VS's IIS Express -. This can be done by adding a UseMaxAge of 0 to the web.config. As follows:
XML
<configuration>
...
<system.webServer>
...
<staticContent>
...
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="0.00:00:00" />
</staticContent>
</system.webServer>
</configuration>
Notes
This works in regular/full IIS as well.
Be sure NOT to deploy this setting to PRODUCTION. Use a production specific web.config there to allow end users to harness some caching :). Otherwise this could be a performance killer.
Using CTRL+F5 instead of just F5 SHOULD also refresh it, however that somehow did not work either Chrome v39.0.2171.71 m). I found out it DID work to directly open the cached Javascript URL in the same browser (!) tab, press Ctrl+F5 on that and then return to the (HTML) page and use CTRL+F5 there again.
Another option that sometimes works is to restart IIS Express (Taskbar right click and choose 'Exit' from context menu). But that is also pretty cumbersome.. :)

debugging firefox extensions

I'm building an extension for Firefox.
I've checked the javascripts and they work well.
I've tried to make all the modules of the extensions right. But every time I try to install the plug-in into my firefox it says "Impossible to Install.. the component is damaged".
I'm looking for an "extension debugger" that can find the error that makes my add-on not working. Any advise?
I was looking for a link to Firefox background page debugging.
I found this link to Firefox debugging.
It says to follow these steps:
open Firefox
enter "about:debugging" in the URL bar
check the box labelled "Enable add-on debugging"
click the "Debug" button next to your extension
click "OK" in the warning dialog.
I don't think there is a dedicated debugger for that. Look at this article, maybe it can help: http://blogger.ziesemer.com/2007/10/javascript-debugging-in-firefox.html
Regards, Hiawatha
There are some debuggers for Firefox extensions, inparticular Venkman and Chromebug (which only works reliably with Firefox v5).
These will be able to break (pause code execution and launch debugger) when an exception occurs but don't usually help when you've got packaging problems, which are often caused by
Bad manifests - look though Mozilla's packaging documentation, in particular the format of manifests.
Errors in XML - validate all XML files (such as install.rdf).
Referenced files that are missing (e.g. a DTD referenced in the XML that is missing)
With the lack of tools, the best option is often to compare your extension's manifests and directory structure against a known good extension (e.g. an example Hello World extension, or an earlier version of your extension) as something as simple as a wrong entity in a DTD file can cause the error you are seeing.
Is this is a classic extension or the more recent bootstrapped type?
I would recommend to check the text encoding of install.rdf, chrome.manifest and bootstrap.js. Anything else than ANSI would be a cause of troubles.

Visual Studio says it can't find source code for a web-debug

I'm using VS2005, and have been for many years without problems, and 2003 before that.
Today suddenly, when I try and debug javascript on a site from the web, the debugger loads as normal but complains it can't find the source and offers me the chance to go looking for it. In the Script Explorer it shows all of the files loaded by the page, it just won't show me the source for them when I double-click on them.
I've tried resetting all settings to web-development default. Didn't work. I even tried exporting the settings from another machine (XP) I have with VS2005 on it that works fine. After importing to the faulty machine (on Win 7) it made no difference.
Any ideas?
Steps to recreate:
1. Open IE9, go to yahoo.com
2. Click View->External Script Debugger->Open
3. Once in the debugger it says cannot find source and offers me a dialog to help me find it on my local machine (why would it be there?).
4. In the Script Explorer I see all html and js files the page loaded, but upon double-clicking them, nothing happens. Usually it opens the source and you can set breakpoints.
Working config is on XP/IE8
Non-working config is on Win 7/IE9 but was working fine before today.
I just noticed a bizarre side-effect. The File menu in IE9 is greyed out during the debug session and even after I've closed VS. So freaky.
Well, no solution was found as to why VS2005 suddenly developed a lack of understanding as to how to get JavaScript source code for live sites. I uninstalled it and installed VS2010 instead and that's working just fine, on the same sites. Maybe re-installing VS2005 would have worked, but I'd had VS2010 around waiting to be installed for a while anyway, so two birds, one stone and all that.
It remains a mystery. No point anyone offering any further input now. The problem is history.

Debugging asp.net with firefox and visual studio.net - very slow compared to IE

Debugging asp.net websites/web projects in visual studio.net 2005 with Firefox is loads slower
than using IE.
I've read something somewhere that there is a way of fixing this but i can't for the life of me find it again.
Does anyone know what i'm on about and can point me in the right direction please?
Cheers
John
edit
sorry rob i haven't explained myself very well(again). I prefer Firefox for debugging (firebug etc)
hitting F5 when debugging with IE the browser launches really quickly and clicking around my web application is almost instant and when a breakpont is hit i get to my code straight away with no delays.
hitting F5 when debugging with FireFox the browser launches really slowly (ok i have plugins that slow FF loading) but clicking around my web application is really really slow and when a breakpoint is hit it takes ages to break into code.
i swear i've read something somewhere that there is a setting in Firefox (about:config maybe?) that when changed to some magic setting sorts all this out.
bingo. found the article i read before.
i just changed my network.dns.ipv4OnlyDomains property in about:config to localhost. restarted firefox and now firefox performs the same as IE when debugging asp.net with visual studio (2005).
hope this helps anyone else that has the same problem.
"Alternative solution". Do the following in Firefox
about:config in the address bar
set network.dns.disableIPv6 to true.
Are you serious? One of the main reasons I stick to Firefox is because its so much nicer to develop with..
The live source update is awesome (view source > change code > rebuild > F5 in source)...
What is actually "slow".. I mean, the some browsers tend to be slower at rendering, but I dont see how it affects your debug time? As soon as the request is made, and your breakpoint is hit in the code, it stops?
For quick debugging try this..
Add Debugger.Break() into your code at an appropriate place.
Browse to the page in firefox (via localhost) if on local dev machine? and the Visual Studio Just in Time debugger should pop up.. select the currently open instance of Visual Studio and you can step into the code where every you want without having to start from the beginning or jumping to cursor.
-- Lee

Resources