I started using VS Code (under Windows 10), since it seems this is what many/most Nim users do.
I've wrote my first own little module (a fixed-size array, allocated on the shared heap, for passing data across threads; could not find an existing nimble package for this), and ran into an issue testing it.
I wrote some test code, to see if my module works. Unfortunately, the compiled Nim executable program "blocks" until VS Code is closed. Using the "test" task works. But trying to run the executable from the command-line (for example, if I want to pass arguments to the it) doesn't.
I guess this is a common issue, but my search returned no answer. Also, I can't tell if it is a VS-Code problem, or something specific to Nim, sine I haven't used VS-Code before.
My settings.json:
},
"nim.buildOnSave": true, "nim.buildCommand": "cpp", "nim.lintOnSave": true, "nim.project": [], "nim.licenseString": "# Copyright 2017 Sebastien Diot.nn",
"C_Cpp.intelliSenseEngine": "Default"
}
My tasks.json:
}, "command": "nim.exe", "args": ["c", "-o:../bin/${fileBasenameNoExtension}", "--threads:on", "${fileBasename}"],
},
}
},
}, "command": "nim.exe", "args": ["c", "-r", "-o:../bin/${fileBasenameNoExtension}", "--threads:on", "${fileBasename}"],
},
}
}
]
}
I work with VS code for Nim, but how I (and I'm guessing a lot of Nim users work) usually compile and execute the apps in a separate command-line (ie, what editor or IDE you're using doesn't affect your dev and testing).
Just a total random thumbsuck, but it may be some interaction with "nimsuggest" that can cause this problem? Try disabling the Nim-specific addons in VS Code (or just disabling nimsuggest) and see if that makes a difference?