I am currently working on a project with a unique architecture.
During the page_load
event, we utilize a switch case
structure:
switch (command)
{
case "LOAD":
load();
break;
case "UNLOAD":
unload();
case "SAVE":
save();
break;
}
For aspx pages with a custom Ajax method, we assign values to the command variable and then make decisions on which methods to call during the page_load
event post back.
//this custom method works effectively
var postData = "Command=LOAD";
AjaxPost(postData, null, null, function (data) {
if ($.trim(data) != "") {
//perform some action
}
});
My inquiry is how to debug the methods within my switch case
statement since Response.Write() and JavaScript alerts do not function in this scenario. I am uncertain if setting a Breakpoint
with these post backs will work. Due to our unique architecture, using breakpoints for debugging is not feasible for us.
Note: Our system utilizes Ajax and the post back is not triggered by a submit action, meaning the page should not refresh.