Hi! I’m a self-taught novice programmer trying to write a macro in javascript for ImageJ. I’ve built a program that I think works, but trying to debug it without a proper debugger has been hell. I’m a hair away from just giving up and rewriting the whole thing in the program’s native macro language. I looked online and it seems like I should be able to set up a debugging environment in Visual Studio Code, but I couldn’t find any guide for doing that specifically for ImageJ. I use Visual Studio Code to write my javascript, but any advice on any platform or even just what I need to find to get started would be helpful. Thank you!

    • qwamqwamqwam@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      Trust me, I’m far from the delusion that I can write a program that does the things I want it to on the first try haha. By “I think it works” I mean that the code is to the point where at least visually I can’t detect any obvious issues and VSC isn’t throwing up any red flags, either. But when I try to run the program, it throws an error message and a line number, which I have to take back to VSC and edit blindly without any view of the variables and context. Swapping back and forth is becoming a huge headache. A debugger, even one as simple as just installing the ImageJ package into VSC(don’t know how to do this) and telling me when I’m calling a function wrong, would be massively helpful.