2

Like most of you I usually encounter with the below Error. Does anyone aware of any technique/tool to debug errors in Cloud pages.

**500 - Internal server error.**

There is a problem with the resource you are looking for, and it cannot be displayed."

Did really Salesforce miss this feature in MC and needs to look into adding this feature!

2 Answers 2

10

Using SSJS try/catch is your best option here.

<script runat="server"> 
Platform.Load("Core","1.1.1"); 
try{ 
</script> 

%%[ your AMPscript block goes here  ]%% 

<script runat="server"> 
}catch(e){  
Write(Stringify(e)); 
} 
</script>

It’s also somewhat easier to test your script in Email Studio if possible, as it will display the error message on screen immediately.

Here’s a blog post where I explain the possible debugging techniques: Debugging AMPscript

5

Correct, there really is no specific built-in debugging tool available with Marketing Cloud for the Cloud Pages.

Technical Support has more backend logs available that they can provide you, but option is to use the Cloud Page code inside of an Email and just view it through the Email Preview way - this way you'll at least see more detailed error message right off the bat.

If you feel like SFMC Cloud Page debugging should be a feature in SFMC - please vote for the Idea.

Another option is to code defensively, as recommended by most developers. There is this small blog post that explain how to use SSJS Try/Catch statements with AMPscript to help you get started.

You must log in to answer this question.

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