• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 378
  • 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...

  • 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.
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?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

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