debuggable_targets.lua 719 B

123456789101112131415161718192021222324252627282930
  1. -- imports
  2. import("core.project.config")
  3. import("core.project.project")
  4. import("core.base.json")
  5. function main ()
  6. -- load config
  7. config.load()
  8. -- print targets
  9. local names = {}
  10. for name, target in pairs((project.targets())) do
  11. if target:is_binary() then
  12. table.insert(names, name)
  13. end
  14. end
  15. table.sort(names)
  16. if json.mark_as_array then
  17. json.mark_as_array(names)
  18. end
  19. local localjson = json.encode(names)
  20. -- denote the start of vscode information to ignore anything logging to stdout before this point
  21. print("__begin__")
  22. print(localjson)
  23. -- print end tag to ignore other deprecated/warnings infos
  24. print("__end__")
  25. end