I've spent 30 minutes to debug a piece of code.

Used $key instead of @key.

How can I check the syntax? Any tools on SFMC?

  • 1
    There is that free AMPScript Editor 'app' in AppExchange, but it honestly isn't that good. Mar 6, 2018 at 20:33

3 Answers 3


I use SublimeText3 with an Add-on of SeanJA https://github.com/SeanJA/ampscript-st2.

Pretty easy to setup and also highlights HTML. Only downside is that the if fold function is not 100% correct.

I believe that this is one of the best tools.

  • Will test, thank you Mar 8, 2018 at 12:52
  • What do you mean by the "if fold" function. Is that IIF()?
    – Daniel
    Jan 18, 2019 at 14:53
  • When you write code you can usually click on codeblocks to only show the first line. For example if you write a 50 line if statement and you „fold“ it it will only show one line. And then the statement that comes after the if has been closed. Jan 19, 2019 at 16:57

I personally use Salesforce Marketing Cloud Extension for Google Chrome, which a.o. does syntax highlighting and syntax error warning.


I've written a new AMPscript syntax highlighter. It's in the Sublime Text package repository: AMPscript Syntax Highlighter.

It replaced the old SeanJ one.

The source is here: https://github.com/wvpv/ampscript-syntax-highlighter

You must log in to answer this question.

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