this post was submitted on 24 Jul 2023
11 points (100.0% liked)

Learn Programming

1625 readers
2 users here now

Posting Etiquette

  1. Ask the main part of your question in the title. This should be concise but informative.

  2. Provide everything up front. Don't make people fish for more details in the comments. Provide background information and examples.

  3. Be present for follow up questions. Don't ask for help and run away. Stick around to answer questions and provide more details.

  4. Ask about the problem you're trying to solve. Don't focus too much on debugging your exact solution, as you may be going down the wrong path. Include as much information as you can about what you ultimately are trying to achieve. See more on this here: https://xyproblem.info/

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS
 

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!

you are viewing a single comment's thread
view the rest of the comments
[–] qwamqwamqwam 1 points 1 year ago (1 children)

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.

[–] [email protected] 2 points 1 year ago (1 children)
[–] qwamqwamqwam 2 points 1 year ago

Thank you so much! This is incredibly helpful.