Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

debugger; 1

Status
Not open for further replies.

need2progm

Programmer
Dec 13, 2002
92
US

I have recently rebuilt my development server. After reinstalling visual studio 2003 the debugger (keyword) in the javascript (code in front) is not breaking out. I am having to pop alerts for debugging.. which is horrible. Can anyone give me some advice on how to re-enable this feature.

Example…
function ValueChanged(ID)
{
//this is not working… ARGH!!
debugger;

var checkAll = window.document.getElementById('UserControl'+ID+'_chkAll');
var checkAllValue = checkAll.checked;
.
.
}

Thanks to anyone who can help me out here!!!
 
i think the interdev may not have been installed properly, whether or not the debugger; command is there it will usually open the file and point out the line...

Known is handfull, Unknown is worldfull
 
If dont know if you are interested but there are some development tools available for FireFox which are very useful for debugging etc. The two most useful are the Javascript console and also a DOM Inspector.

 

Go into Tools -> Internet Options -> Advanced, and make sure "Disable script debugging" is NOT checked.

I also like to make sure "Display a notification about every script error" is checked, although not sure if it makes a difference to the debugger or not.

Within Interdev, go into Tools -> Options -> Debugger, and make sure that "Attach to programs running on this machine" is checked.

I've also found that with the Interdev debugger, it occasionally does not pop up even with those settings. There is a workaround I've found (which I've never worked out why it works, or found reference to on any forum anywhere) - so I will share it with you. It has never failed to work for me, so I'd be interested to see if it works for you.

If you have a page with a debugger statement (or JS error) that doesn't give you the "debug" option, insert this in a script tag at the top of the page:

Code:
window.open('','','');

Refresh the page. You will get a blank window appear. Close the window. Refresh the page again, and you will get the window again. But you will also - I virtually guarantee it - get the option to debug.

As I said - I've no idea why it works or how it works, but it's never let me down yet.

Hope this helps,
Dan


 
That worked.... and I figured out what was causing the error and fixed it!!

I have a happy boss now!!

Thanks
Carly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top