In all of my forms' before page event, I call a global function called verifyUserSession(applicationName); that verifies if the user is allowed to access the current application and if they are not logged in using the built in security system, it will redirect them to our Intranet login page.
This is exactly what I want under normal circumstances but if I want to debug a script, this causes a problem because Verj appears to start an entirely new session, even though I am already logged into our dev server (which is what I am currently debugging against) in another tab in Chrome and I am redirected to the login page. If I comment out the call to verifyUserSession(applicationName) I am able to debug interactively.
Is there a pragmatic way to detect if I am in debugging mode so I can not call verifyusersesion if I am in debugging mode ?
On a side note, I know that the breakpoints are added for all users, so I would write something like this to not call this method for me but continue to call it for everyone else:
Code: Select all
if (system.isDebugging == true && system.securityManager.getCredential("REALNAME") != "Segi") {
verifyUserSession(applicationName);
}