All,
I have a situation where I have some JS written directly into a Landing Page Template.
I want to debug said JS. I'm using Chrome for this. When I hit F12 and go to sources, I can't find the LPT code anywhere. I did a 'search all files' and typed in a variable name I know exists in the code, and that turned up nothing.
As per usual, I am sure I am being super blind and or super dense. Any help would be appreciated.
Cheers
Jo
Solved! Go to Solution.
All,
with @SanfordWhiteman 's help we found a cunning answer. If you can't get the chrome devtools to surface the code, then put this line of code
debugger;
where you want to debug in your Landing Page Template. It'll force the chrome devtools to bring this code into view. From then you can apply other breakpoints and or start stepping through your code.
A tiny bit odd, but super handy.
Definitely the main doc would be under Sources, and AFAIK can't be black-boxed. What's the URL?
@SanfordWhiteman , its a template URL so I'm not sure I can expose it to you?
If you're in the Template preview, the doc would be in an IFRAME.
I hunted down through the iframes and still couldn't see what I was looking for.
I'm happy to screen share with you if you have time.
All,
with @SanfordWhiteman 's help we found a cunning answer. If you can't get the chrome devtools to surface the code, then put this line of code
debugger;
where you want to debug in your Landing Page Template. It'll force the chrome devtools to bring this code into view. From then you can apply other breakpoints and or start stepping through your code.
A tiny bit odd, but super handy.