How can I find where my code is incorrect when writing a server script?

How can I find where my code is incorrect when writing a server script?

enable developer mode, then test on working doctype

how to find wrong code line :frowning:

share screenshot