• New to Javascript questions

    From Vonskie@VERT/SHAKEYVW to ALL on Sat Aug 10 21:53:35 2019
    How would you debug an index.xjs fileããI have vscode for linux loaded it does not know what that file type isããI know you can use notepad mousepad etc to edit the file and the load theãwebpage but there must be a better way?ããSo you can step thru code and watch variables etc.ããããããã* Shakeybbs.com * (Allen, Tx) HTTP-HTTPS-WS-WSS-SSH-Telnet-FTP-POP3 [Dove-Net,ãFidoNet,FDN Echo File] (10 Nodes hosted on a PI4)ãã---ã þ Synchronet þ Shakey BBSã
  • From echicken@VERT/ECBBS to Vonskie on Sun Aug 11 03:03:23 2019
    Re: New to Javascript questionsã By: Vonskie to ALL on Sat Aug 10 2019 21:53:35ãã Vo> How would you debug an index.xjs fileããI would look at the error message(s) being generated and then address them by fixing the embedded SSJS. ãOr if there are no errors, I'd examine the script(s) until I found the cause of whatever bug I was tryingãto find.ãã Vo> I have vscode for linux loaded it does not know what that file type isããXJS is unique to Synchronet. It's HTML with embedded server-side javascript. VS Code wouldn't know whatãit was unless someone wrote a plug-in / extension to handle it, and I'm 99.99999% certain that hasn'tãbeen done. I almost started on one a month or two ago but it seemed like a lot of hassle for something Iãhaven't needed thus far.ãã Vo> I know you can use notepad mousepad etc to edit the file and the load theã Vo> webpage but there must be a better way?ãã"There must be a better way" is a big assumption. There are a lot of things about the nature ofãSynchronet that make such assumptions unsafe. We can dig into that further if you really want to knowãmore.ãã Vo> So you can step thru code and watch variables etc.ããAs far as I know, we don't have a debug tool for JS available that'll do what you're describing. (Iãthink jsexec has a step debugger, but that won't help you with the webserver.)ããNormally if I can't figure something out just by reading the relevant scripts and error messages, I startãinserting log() or write() statements in relevant places so I can examine the state of things at variousãstages. It's ugly, but it works.ãã---ãechickenãelectronic chicken bbs - bbs.electronicchicken.comã þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.comã
  • From Vonskie@VERT/SHAKEYVW to echicken on Sun Aug 11 21:09:02 2019
    Thank you very much for your answersããã* Shakeybbs.com * (Allen, Tx) HTTP-HTTPS-WS-WSS-SSH-Telnet-FTP-POP3 [Dove-Net,ãFidoNet,FDN Echo File] (10 Nodes hosted on a PI4)ãã---ã þ Synchronet þ Shakey BBSã