How to set the port the Lime VSCode extension connects to?

The extension automatically adds --connect 6000 to the build command, but port 6000 on my machine is already used by the X server. I didn’t find a relevant option in the extension’s settings. Is it possible to change the port or modify the build command manually? (I don’t want to write the command to the terminal every time)

The Lime extension doesn’t actually do all that much except supply vshaxe with the correct compiler arguments from project.xml files, hence this is a vshaxe setting called "haxe.displayPort". It’s also documented here.

However, the default setting is "auto", so it already automatically finds the next free port starting from 6000 - this is necessary if you have multiple VSCode instances with Haxe projects open, and it generally works fine for me there - first instance gets port 6000, then 6001, then 6002… Is port 6000 really “in use” in your case, or is it more that you would like it to be kept free?

1 Like

I tried changing the port setting and it worked. Thanks!

I’m still curious if there’s a potential issue with vshaxe’s free port detection or not. Did your X server run into an error because the port was already taken, or was the error on the vshaxe side?

When I tried to run the build task, it displayed the command it runs (something like Executing task: "/usr/local/bin/lime" build neko -debug --connect 6000) and it didn’t do anything.
I tried to set the port back to auto and reloaded the IDE and the build worked flawlessly, so maybe I just had to reload VS Code several times.