I am trying to debug a canvas app and as per the documentation i tried the following code snippet in developer console in execute anonymous window.


Debugging in a Canvas App

You must use Chrome, Firefox, or Safari to follow these steps.

When using the Force.com Canvas SDK, you can enable debug mode to make troubleshooting easier.

With your canvas app open in your browser, open the console.
Type Sfdc.canvas.console.enable(); and press return.
Refresh your browser.

Use data from this screen to debug canvas-related problems.

But i got the following error,

enter image description here

I have been executing all the canvas app through "Canvas App Previewer".

Any suggestions please.

1 Answer 1


It looks like you are opening the salesforce developer console. The canvas debugger is used in the browser debug console.

In chrome, go to the setup menu next to the address bar (three horizontal lines) open tools > javascript console. In the console that opens, type the command.

In FF you would use Firebug. Safari use developer tools.

I will get the docs updated to be more clear on which console to use

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .