You need to sign in to do that
Don't have an account?
Steven Houghtalen
Developer Console - system debug statement
When I place a system.debug statement inside a method, it doesn't show up in the log. If it is not inside a method, it works fine. Am I doing something wrong?
Looks like you are executing(Click on Execute button) the method from the developer console, which means the code inside the method is getting compiled(Checks only for the syntaxes) & it won't run the code.
To run the code you want to call the method from the developer console.
For eg, if you have below method in your developer console. To run the above method , Call the method as mentioned here : method1();
Now execute your code in the developer console, which will run the code and will pring debug statement in the log.
Thanks
Satya.
All Answers
It may happen that your method is not getting exceuted or your excution is not getting reached till that debug line.
You can see the line numbers in debug log to take the idea of the lines that are getting exectued.
Hope this helps.
Thanks,
Rashi
Looks like you are executing(Click on Execute button) the method from the developer console, which means the code inside the method is getting compiled(Checks only for the syntaxes) & it won't run the code.
To run the code you want to call the method from the developer console.
For eg, if you have below method in your developer console. To run the above method , Call the method as mentioned here : method1();
Now execute your code in the developer console, which will run the code and will pring debug statement in the log.
Thanks
Satya.