I'm not sure why you're having issues with autocomplete.
Make sure it says "JavaScript" in the bottom right:

Here's an example. I'm starting to enter PathNameUtils
like where the arrow points, and you can see I get a completion list:
Now I'm starting to enter AddTrailingSlash
, and it shows the property and its definition:
Once I type the opening paren, it shows parameter information:
There are some objects VSCode can't give you Intellisense for, like this:
var obj = { firstName: "Dan", lastName: "Thomas" };
If you pass it as a parameter to another function, VSCode won't know what it is.
However, if you have a class definition like this:
...and you start using it, VSCode will provide Intellisense:
If you pass it as a parameter into a function like this, VSCode doesn't know the definition of "paths":

But, you can create JSDoc comments for the function. Start by typing \**
and hitting return:

Then modify the parameter definition to add the "type", as show by the red arrow, and now you get true Intellisense completion:
So basically, you have to give VSCode some way to infer the object type, if you want actuall Intellisense. Otherwise it just gives you a list of all the names it knows about.
Which isn't horrible, by the way, because you can type just a few letters to get the list filtered down, like here where I typed gfn
:

There's tons of stuff like this. I know some of this because I used Visual Studio during my professional development career, and VSCode has a lot of similarities.
Oh, and regarding properties, I've never been able to figure them out like how Jim shows. So I just use a lot of console.log()
messages along with JSON.stringify()
. I'd rather do it like Jim mentioned, but I can't seem to remember to try it, and I just resort to the old tried-and-true methods.
However, when dealing with JXA automation objects, after a while you start to understand the naming conventions compared to AppleScript, and it gets easier.
Hope this helps.