Question

I want to set a breakpoint on the __DoPostBack method, but it's a pain to find the correct file to set the breakpoint in.

The method __DoPostBack is contained in an auto-generated js file called something like:

ScriptResource.axd?d=P_lo2...

After a few post-backs visual studio gets littered with many of these files, and it's a bit of a bear to check which one the current page is referencing. Any thoughts?

Was it helpful?

Solution

If you using IE7 for testing you can use View -> Script Debugger -> Break on next statement and then just click the button that generates the event(__DoPostBack)

OTHER TIPS

TBH, I dont think there is much value in setting a breakpoint within the Javascript since it pretty much comes straight back to the server anyways.

It would be best to set breakpoints in your server code.. Depending on what you are trying to debug this will be in different places.. Either in the page event cycle or a controls IPostBackEventHandler.RaisePostBackEvent handler.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top