• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 372
  • Last Modified:

Can I Re-register and Debug codebehind registered javascript

I am working on an inherited application so the rational for what I am about to present is not always clear to even me...

In this app, in the page_load, the following code exists...
if (!ClientScript.IsClientScriptBlockRegistered("jsULMRightsObjects"))
{            
            ClientScript.RegisterClientScriptInclude("jsULMRightsObjects", "RightsMgmt.js");            
}

My first question is, while the app is running through my dev server (locally), if I change the code in RightsMgmt.js and "Refresh" the page in the browser.  Will my updated code be re-registered?  The code does NOT sit within an IsPostback check.

My second question is can I debug this code in VS?  I have put break points in the RightsMgmt.js file but they not being hit due to "no symbols loaded".  

In the past I have been able to debug external js files but in those cases I've used a link tag in the aspx page.

Thanks in advance for any help...

0
Bruce
Asked:
Bruce
  • 2
1 Solution
 
BruceAuthor Commented:
Update:  I have tested in another application that I can indeed set a break point, and have it hit, in a RegisterClientScriptInclude javascript file.

I have checked my IE for Disable Script Debugging and it is not set on.  

I have also looked at the "Attach to Process" dialog and the instance of IE that I am wanting to debug is already "attached".

Hope this helps refine my questions.
0
 
BruceAuthor Commented:
Update: I think I have it.  My javascript was not "well-formed" shall we say.  I corrected a function definition and now I can set and htit a breakpoint in the file.

Is this possible?  Or did I change something else unknowingly and now it works?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now