You need to sign in to do that
Don't have an account?
jpatel@alterna
system.debug message and debug logs not getting created
I have a visualforce page and it is connecting ot a custom controller.
I have a button on the VF page which trigger an action method in the controller.
What is it that I am missing?
Thanks
I have a button on the VF page which trigger an action method in the controller.
<apex:commandButton title="Proceed" action="{!firstPageNext}" styleClass="btn img-btn pull-right"></apex:commandButton>My controller method is like this
public void firstPageNext() { system.debug('first page next is executing'); system.debug(LoggingLevel.Info, 'first page next is executing'); system.debug(LoggingLevel.Finest, 'first page next is executing'); system.debug(LoggingLevel.Debug, 'first page next is executing'); system.debug(LoggingLevel.Error, 'first page next is executing'); ... and some other stuff }I can confirm that my `... and some other stuff` part of the code is being executed. The problem I am having is that my `system.debug` message is not displaying in Developer Console Logs or Debug Logs. I crated new debugs rule but I still don't see any debug log or message showing anywhere when my action method got executed.
What is it that I am missing?
Thanks
Below is a code for the same . Please note the following things you have to check
Please check that in your visualforce page you have added the controller to the page.
In debug log , please delete all the List under ‘User Trace Flag’.
After creating the User , click on filter and change the ‘APEX CODE ’ picklist to ‘DEBUG’ and ‘SYSTEM’ picklist to ‘DEBUG’
After creating the log , set the date and time for that particular user name. Below the GIF and screenshot .Hope that will help you.
Regards,
Akshay
Thank you for your reply. I have tried your code and it does display me the logs in developer console.
However, I probally didn't mention this but, the VF page and the custom Controller that I am tyring to add System.Debug() message now are both from an existing single page application which is now working in production. This mean that the Controller is for sure added to the VF page and everything is working fine.
The VF has so many buttons, and each of them is invoking a controller method. And, I have tried to place System.Debug message at the beginning of each of those method in the controller but I never get to see any logs appears.
What do you think could be going wrong?
Thanks
So I have a VF page called MyTestPage and in there I have a few System.Debug(...) lines. Ofcourse I do have a custome controller for that.
When I browse the VF page by clicking on the Preview button then I am able to see my debug messages when I am going throught MyTestPage. And in this case, the VF page url will look something like this https://c.cs14.visual.force.com/apex/MyTestPage.
However, if I access it via a custom Site URL (https://myDomainName.cs14.force.com/mySiteName/apex/MyTestPage) then I will not able to see my debug message.
Any idea why?
Thanks