Could i run the *.swift file from AppCode as a Java "public static void main (String... args){...}" function?

Answered

Hello. Could i run the *.swift file from AppCode as a Java "public static void main (String... args){...}" function?
When i need to test or debug some method in the class in java, i just typing the main function in that class and calling the interested method of that class.
In swift i see only way to run "swift someSwiftFile.swift" from terminal, and this is not allowing me to debug it in my preferable IDE with a GUI.

1 comment
Official comment

Hi,

In case you're looking for something like scratches functionality in Java - it's not fully supported in AppCode yet. Please vote for CPP-3495.

Other than that, you may try to run your code from main.swift file or use XCTest for that purpose (IDE has an ability to run a single test from context). For more info on testing in AppCode please refer to this post

Please sign in to leave a comment.