1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Really important, how to debug with a template being used?

Discussion in 'JavaScript' started by JoshuaEir, Feb 4, 2022.

  1. #1
    Okay, this is, really, really important to me. I am writing JavaScript code with Golang and PHP. When I use a template, how do I debug/use developer tools for the JavaScript code that has the template in it too? Not being able to do this has slowed me down.

    Thanks,
    Joshua
     
    JoshuaEir, Feb 4, 2022 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #2
    You should still be able to use your browsers developer tools to debug.
     
    sarahk, Feb 4, 2022 IP
  3. JoshuaEir

    JoshuaEir Member

    Messages:
    59
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    28
    #3
    I'm using Visual Code, I couldn't. Once there was an error on the page and then the code was available, that's it!
     
    JoshuaEir, Feb 4, 2022 IP
  4. JoshuaEir

    JoshuaEir Member

    Messages:
    59
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    28
    #4
    I have found this out by trial and error, I thought I would contribute to anyone having the same problem. Using debug mode with the browser (f12) will work when there is a template above the function only if Developer tools are opened (f12) and the word, "debugger;" is on the line to start at with the browser. This is needed because the page does not show up using the source tab.
     
    JoshuaEir, Mar 11, 2022 IP